util

package
v4.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAddress

func CreateAddress(addr string, meta map[string]string) registry.Generic

func CreateEndpoint

func CreateEndpoint(name string, meta map[string]string) registry.Generic

func CreateNode

func CreateNode() registry.Node

func DetectType

func DetectType(i registry.Item) pb.ItemType

func NewChanStatusWatcher

func NewChanStatusWatcher(item registry.Item, input chan map[string]interface{}) registry.StatusWatcher

func NewIntervalStatsWatcher

func NewIntervalStatsWatcher(item registry.Item, interval time.Duration, callback func() map[string]interface{}) registry.StatusWatcher

func NewIntervalStatusWatcher

func NewIntervalStatusWatcher(item registry.Item, interval time.Duration, callback func() (registry.Item, bool)) registry.StatusWatcher

func ToDao

func ToDao(i *pb.Item, d *pb.Dao) registry.Dao

func ToEdge

func ToEdge(i *pb.Item, e *pb.Edge) registry.Edge

func ToGeneric

func ToGeneric(i *pb.Item, e *pb.Generic) registry.Generic

func ToItem

func ToItem(s *pb.Item) registry.Item

ToItem wraps a protobuf item in a registry.Item interface

func ToNode

func ToNode(i *pb.Item, d *pb.Node) registry.Node

func ToOptions

func ToOptions(s *pb.Options) (oo []registry.Option)

ToOptions parses a protobuf pb.Options to a slice of registry.Option

func ToProtoDao

func ToProtoDao(d registry.Dao) *pb.Dao

func ToProtoEdge

func ToProtoEdge(e registry.Edge) *pb.Edge

func ToProtoGeneric

func ToProtoGeneric(e registry.Generic) *pb.Generic

func ToProtoItem

func ToProtoItem(i registry.Item) *pb.Item

ToProtoItem transforms a registry.Item to its protobuf counterpart

func ToProtoItems

func ToProtoItems(ii []registry.Item) []*pb.Item

ToProtoItems transforms a list of interfaces to protobuf for serialization

func ToProtoNode

func ToProtoNode(d registry.Node) *pb.Node

func ToProtoServer

func ToProtoServer(s registry.Server) *pb.Server

func ToProtoService

func ToProtoService(s registry.Service) *pb.Service

func ToServer

func ToServer(i *pb.Item, s *pb.Server) registry.Server

func ToService

func ToService(i *pb.Item, s *pb.Service) registry.Service

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL