1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-12 08:23:58 +02:00
go-micro/plugins/config/source/grpc/util.go

19 lines
359 B
Go
Raw Normal View History

2020-12-26 17:32:45 +02:00
package grpc
import (
"time"
2021-10-12 13:55:53 +02:00
"go-micro.dev/v4/config/source"
2021-10-13 14:31:23 +02:00
proto "github.com/asim/go-micro/plugins/config/source/grpc/v4/proto"
2020-12-26 17:32:45 +02:00
)
func toChangeSet(c *proto.ChangeSet) *source.ChangeSet {
return &source.ChangeSet{
Data: c.Data,
Checksum: c.Checksum,
Format: c.Format,
Timestamp: time.Unix(c.Timestamp, 0),
Source: c.Source,
}
}