Versions in this module Expand all Collapse all v1 v1.0.0 Dec 16, 2023 Changes in this version + func MarshalObjToStruct(input interface{}) (*structpb.Struct, error) + func MarshalPbToString(msg proto.Message) (string, error) + func MarshalPbToStruct(in proto.Message) (out *structpb.Struct, err error) + func UnmarshalStructToObj(structObj *structpb.Struct, obj interface{}) error + func UnmarshalStructToPb(structObj *structpb.Struct, msg proto.Message) error + type AutoRefreshCache interface + Get func(id string) CacheItem + GetOrCreate func(item CacheItem) (CacheItem, error) + Start func(ctx context.Context) + func NewAutoRefreshCache(syncCb CacheSyncItem, syncRateLimiter RateLimiter, resyncPeriod time.Duration, ...) (AutoRefreshCache, error) + type CacheItem interface + ID func() string + type CacheSyncAction int + const Delete + const Unchanged + const Update + type CacheSyncItem func(ctx context.Context, obj CacheItem) (newItem CacheItem, result CacheSyncAction, err error) + type RateLimiter interface + Wait func(ctx context.Context) error + func NewRateLimiter(rateLimiterName string, tps float64, burst int) RateLimiter + type Sequencer interface + GetCur func() uint64 + GetNext func() uint64 + func GetSequencer() Sequencer