registry

package
v4.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ItemType_name = map[int32]string{
		0:  "ALL",
		1:  "EDGE",
		3:  "NODE",
		4:  "SERVICE",
		5:  "SERVER",
		7:  "DAO",
		2:  "GENERIC",
		6:  "ADDRESS",
		8:  "TAG",
		9:  "PROCESS",
		10: "ENDPOINT",
		11: "STATS",
	}
	ItemType_value = map[string]int32{
		"ALL":      0,
		"EDGE":     1,
		"NODE":     3,
		"SERVICE":  4,
		"SERVER":   5,
		"DAO":      7,
		"GENERIC":  2,
		"ADDRESS":  6,
		"TAG":      8,
		"PROCESS":  9,
		"ENDPOINT": 10,
		"STATS":    11,
	}
)

Enum value maps for ItemType.

View Source
var (
	ActionType_name = map[int32]string{
		0: "ANY",
		1: "FULL_DIFF",
		2: "FULL_LIST",
		3: "CREATE",
		4: "UPDATE",
		5: "DELETE",
	}
	ActionType_value = map[string]int32{
		"ANY":       0,
		"FULL_DIFF": 1,
		"FULL_LIST": 2,
		"CREATE":    3,
		"UPDATE":    4,
		"DELETE":    5,
	}
)

Enum value maps for ActionType.

View Source
var (
	LockType_name = map[int32]string{
		0: "Lock",
		1: "Unlock",
	}
	LockType_value = map[string]int32{
		"Lock":   0,
		"Unlock": 1,
	}
)

Enum value maps for LockType.

View Source
var (
	EventType_name = map[int32]string{
		0: "Create",
		1: "Delete",
		2: "Update",
	}
	EventType_value = map[string]int32{
		"Create": 0,
		"Delete": 1,
		"Update": 2,
	}
)

Enum value maps for EventType.

View Source
var File_cells_registry_proto protoreflect.FileDescriptor
View Source
var Registry_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "registry.Registry",
	HandlerType: (*RegistryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Start",
			Handler:    _Registry_Start_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _Registry_Stop_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Registry_Get_Handler,
		},
		{
			MethodName: "Register",
			Handler:    _Registry_Register_Handler,
		},
		{
			MethodName: "Deregister",
			Handler:    _Registry_Deregister_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Registry_List_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _Registry_Watch_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "NewLocker",
			Handler:       _Registry_NewLocker_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "cells-registry.proto",
}

Registry_ServiceDesc is the grpc.ServiceDesc for Registry service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func DeregisterRegistryEnhancedServer

func DeregisterRegistryEnhancedServer(s grpc.ServiceRegistrar, name string)

func RegisterRegistryEnhancedServer

func RegisterRegistryEnhancedServer(s grpc.ServiceRegistrar, srv NamedRegistryServer)

func RegisterRegistryServer

func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer)

Types

type ActionType added in v4.0.1

type ActionType int32
const (
	ActionType_ANY       ActionType = 0
	ActionType_FULL_DIFF ActionType = 1
	ActionType_FULL_LIST ActionType = 2
	ActionType_CREATE    ActionType = 3
	ActionType_UPDATE    ActionType = 4
	ActionType_DELETE    ActionType = 5
)

func (ActionType) Descriptor added in v4.0.1

func (ActionType) Descriptor() protoreflect.EnumDescriptor

func (ActionType) Enum added in v4.0.1

func (x ActionType) Enum() *ActionType

func (ActionType) EnumDescriptor deprecated added in v4.0.1

func (ActionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ActionType.Descriptor instead.

func (ActionType) Number added in v4.0.1

func (x ActionType) Number() protoreflect.EnumNumber

func (ActionType) String added in v4.0.1

func (x ActionType) String() string

func (ActionType) Type added in v4.0.1

type Dao added in v4.0.1

type Dao struct {
	Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"`
	Dsn    string `protobuf:"bytes,2,opt,name=dsn,proto3" json:"dsn,omitempty"`
	// contains filtered or unexported fields
}

func (*Dao) Descriptor deprecated added in v4.0.1

func (*Dao) Descriptor() ([]byte, []int)

Deprecated: Use Dao.ProtoReflect.Descriptor instead.

func (*Dao) GetDriver added in v4.0.1

func (x *Dao) GetDriver() string

func (*Dao) GetDsn added in v4.0.1

func (x *Dao) GetDsn() string

func (*Dao) ProtoMessage added in v4.0.1

func (*Dao) ProtoMessage()

func (*Dao) ProtoReflect added in v4.0.1

func (x *Dao) ProtoReflect() protoreflect.Message

func (*Dao) Reset added in v4.0.1

func (x *Dao) Reset()

func (*Dao) String added in v4.0.1

func (x *Dao) String() string

func (*Dao) Validate added in v4.0.1

func (this *Dao) Validate() error

type Edge added in v4.0.1

type Edge struct {
	Vertices []string `protobuf:"bytes,1,rep,name=vertices,proto3" json:"vertices,omitempty"`
	// contains filtered or unexported fields
}

func (*Edge) Descriptor deprecated added in v4.0.1

func (*Edge) Descriptor() ([]byte, []int)

Deprecated: Use Edge.ProtoReflect.Descriptor instead.

func (*Edge) GetVertices added in v4.0.1

func (x *Edge) GetVertices() []string

func (*Edge) ProtoMessage added in v4.0.1

func (*Edge) ProtoMessage()

func (*Edge) ProtoReflect added in v4.0.1

func (x *Edge) ProtoReflect() protoreflect.Message

func (*Edge) Reset added in v4.0.1

func (x *Edge) Reset()

func (*Edge) String added in v4.0.1

func (x *Edge) String() string

func (*Edge) Validate added in v4.0.1

func (this *Edge) Validate() error

type EmptyResponse

type EmptyResponse struct {
	// contains filtered or unexported fields
}

func (*EmptyResponse) Descriptor deprecated

func (*EmptyResponse) Descriptor() ([]byte, []int)

Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) ProtoReflect

func (x *EmptyResponse) ProtoReflect() protoreflect.Message

func (*EmptyResponse) Reset

func (x *EmptyResponse) Reset()

func (*EmptyResponse) String

func (x *EmptyResponse) String() string

func (*EmptyResponse) Validate

func (this *EmptyResponse) Validate() error

type Event

type Event struct {

	// Event Id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// type of event
	Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=registry.EventType" json:"type,omitempty"`
	// unix timestamp of event
	Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// item entry
	Item *Item `protobuf:"bytes,4,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

Event is registry event

func (*Event) Descriptor deprecated

func (*Event) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetId

func (x *Event) GetId() string

func (*Event) GetItem

func (x *Event) GetItem() *Item

func (*Event) GetTimestamp

func (x *Event) GetTimestamp() int64

func (*Event) GetType

func (x *Event) GetType() EventType

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

func (*Event) Validate

func (this *Event) Validate() error

type EventType

type EventType int32

EventType defines the type of event

const (
	EventType_Create EventType = 0
	EventType_Delete EventType = 1
	EventType_Update EventType = 2
)

func (EventType) Descriptor

func (EventType) Descriptor() protoreflect.EnumDescriptor

func (EventType) Enum

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor deprecated

func (EventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EventType.Descriptor instead.

func (EventType) Number

func (x EventType) Number() protoreflect.EnumNumber

func (EventType) String

func (x EventType) String() string

func (EventType) Type

type Generic added in v4.0.1

type Generic struct {
	Type ItemType `protobuf:"varint,1,opt,name=type,proto3,enum=registry.ItemType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Generic) Descriptor deprecated added in v4.0.1

func (*Generic) Descriptor() ([]byte, []int)

Deprecated: Use Generic.ProtoReflect.Descriptor instead.

func (*Generic) GetType added in v4.0.1

func (x *Generic) GetType() ItemType

func (*Generic) ProtoMessage added in v4.0.1

func (*Generic) ProtoMessage()

func (*Generic) ProtoReflect added in v4.0.1

func (x *Generic) ProtoReflect() protoreflect.Message

func (*Generic) Reset added in v4.0.1

func (x *Generic) Reset()

func (*Generic) String added in v4.0.1

func (x *Generic) String() string

func (*Generic) Validate added in v4.0.1

func (this *Generic) Validate() error

type GetRequest

type GetRequest struct {
	Id      string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId added in v4.0.1

func (x *GetRequest) GetId() string

func (*GetRequest) GetOptions

func (x *GetRequest) GetOptions() *Options

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

func (x *GetRequest) ProtoReflect() protoreflect.Message

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

func (*GetRequest) Validate

func (this *GetRequest) Validate() error

type GetResponse

type GetResponse struct {
	Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

func (*GetResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetItem

func (x *GetResponse) GetItem() *Item

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

func (x *GetResponse) ProtoReflect() protoreflect.Message

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

func (*GetResponse) Validate

func (this *GetResponse) Validate() error

type Item

type Item struct {
	Id       string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name     string            `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// Types that are assignable to Item:
	//
	//	*Item_Generic
	//	*Item_Edge
	//	*Item_Server
	//	*Item_Node
	//	*Item_Service
	//	*Item_Dao
	Item      isItem_Item `protobuf_oneof:"item"`
	Adjacents []*Item     `protobuf:"bytes,11,rep,name=adjacents,proto3" json:"adjacents,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

func (*Item) Descriptor() ([]byte, []int)

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetAdjacents added in v4.0.1

func (x *Item) GetAdjacents() []*Item

func (*Item) GetDao added in v4.0.1

func (x *Item) GetDao() *Dao

func (*Item) GetEdge added in v4.0.1

func (x *Item) GetEdge() *Edge

func (*Item) GetGeneric added in v4.0.1

func (x *Item) GetGeneric() *Generic

func (*Item) GetId added in v4.0.1

func (x *Item) GetId() string

func (*Item) GetItem

func (m *Item) GetItem() isItem_Item

func (*Item) GetMetadata added in v4.0.1

func (x *Item) GetMetadata() map[string]string

func (*Item) GetName added in v4.0.1

func (x *Item) GetName() string

func (*Item) GetNode

func (x *Item) GetNode() *Node

func (*Item) GetServer added in v4.0.1

func (x *Item) GetServer() *Server

func (*Item) GetService

func (x *Item) GetService() *Service

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

func (x *Item) ProtoReflect() protoreflect.Message

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

func (*Item) Validate

func (this *Item) Validate() error

type ItemMap added in v4.0.1

type ItemMap struct {
	Items map[string]*Item `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ItemMap) Descriptor deprecated added in v4.0.1

func (*ItemMap) Descriptor() ([]byte, []int)

Deprecated: Use ItemMap.ProtoReflect.Descriptor instead.

func (*ItemMap) GetItems added in v4.0.1

func (x *ItemMap) GetItems() map[string]*Item

func (*ItemMap) ProtoMessage added in v4.0.1

func (*ItemMap) ProtoMessage()

func (*ItemMap) ProtoReflect added in v4.0.1

func (x *ItemMap) ProtoReflect() protoreflect.Message

func (*ItemMap) Reset added in v4.0.1

func (x *ItemMap) Reset()

func (*ItemMap) String added in v4.0.1

func (x *ItemMap) String() string

func (*ItemMap) Validate added in v4.0.1

func (this *ItemMap) Validate() error

type ItemType

type ItemType int32
const (
	ItemType_ALL      ItemType = 0
	ItemType_EDGE     ItemType = 1
	ItemType_NODE     ItemType = 3
	ItemType_SERVICE  ItemType = 4
	ItemType_SERVER   ItemType = 5
	ItemType_DAO      ItemType = 7
	ItemType_GENERIC  ItemType = 2
	ItemType_ADDRESS  ItemType = 6
	ItemType_TAG      ItemType = 8
	ItemType_PROCESS  ItemType = 9
	ItemType_ENDPOINT ItemType = 10
	ItemType_STATS    ItemType = 11
)

func (ItemType) Descriptor

func (ItemType) Descriptor() protoreflect.EnumDescriptor

func (ItemType) Enum

func (x ItemType) Enum() *ItemType

func (ItemType) EnumDescriptor deprecated

func (ItemType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ItemType.Descriptor instead.

func (ItemType) Number

func (x ItemType) Number() protoreflect.EnumNumber

func (ItemType) String

func (x ItemType) String() string

func (ItemType) Type

type Item_Dao added in v4.0.1

type Item_Dao struct {
	Dao *Dao `protobuf:"bytes,10,opt,name=dao,proto3,oneof"`
}

type Item_Edge added in v4.0.1

type Item_Edge struct {
	Edge *Edge `protobuf:"bytes,6,opt,name=edge,proto3,oneof"`
}

type Item_Generic added in v4.0.1

type Item_Generic struct {
	Generic *Generic `protobuf:"bytes,5,opt,name=generic,proto3,oneof"`
}

type Item_Node

type Item_Node struct {
	Node *Node `protobuf:"bytes,8,opt,name=node,proto3,oneof"`
}

type Item_Server added in v4.0.1

type Item_Server struct {
	Server *Server `protobuf:"bytes,7,opt,name=server,proto3,oneof"`
}

type Item_Service

type Item_Service struct {
	Service *Service `protobuf:"bytes,9,opt,name=service,proto3,oneof"`
}

type ListRequest

type ListRequest struct {
	Options          *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
	AdjacentsOptions *Options `protobuf:"bytes,2,opt,name=adjacentsOptions,proto3" json:"adjacentsOptions,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

func (*ListRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetAdjacentsOptions added in v4.0.1

func (x *ListRequest) GetAdjacentsOptions() *Options

func (*ListRequest) GetOptions

func (x *ListRequest) GetOptions() *Options

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

func (*ListRequest) Validate

func (this *ListRequest) Validate() error

type ListResponse

type ListResponse struct {
	Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

func (*ListResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetItems

func (x *ListResponse) GetItems() []*Item

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

func (*ListResponse) Validate

func (this *ListResponse) Validate() error

type LockType added in v4.0.4

type LockType int32
const (
	LockType_Lock   LockType = 0
	LockType_Unlock LockType = 1
)

func (LockType) Descriptor added in v4.0.4

func (LockType) Descriptor() protoreflect.EnumDescriptor

func (LockType) Enum added in v4.0.4

func (x LockType) Enum() *LockType

func (LockType) EnumDescriptor deprecated added in v4.0.4

func (LockType) EnumDescriptor() ([]byte, []int)

Deprecated: Use LockType.Descriptor instead.

func (LockType) Number added in v4.0.4

func (x LockType) Number() protoreflect.EnumNumber

func (LockType) String added in v4.0.4

func (x LockType) String() string

func (LockType) Type added in v4.0.4

type NamedRegistryServer

type NamedRegistryServer interface {
	RegistryServer
	Name() string
}

type NewLockerRequest added in v4.0.4

type NewLockerRequest struct {
	Prefix string   `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Type   LockType `protobuf:"varint,2,opt,name=type,proto3,enum=registry.LockType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*NewLockerRequest) Descriptor deprecated added in v4.0.4

func (*NewLockerRequest) Descriptor() ([]byte, []int)

Deprecated: Use NewLockerRequest.ProtoReflect.Descriptor instead.

func (*NewLockerRequest) GetPrefix added in v4.0.4

func (x *NewLockerRequest) GetPrefix() string

func (*NewLockerRequest) GetType added in v4.0.4

func (x *NewLockerRequest) GetType() LockType

func (*NewLockerRequest) ProtoMessage added in v4.0.4

func (*NewLockerRequest) ProtoMessage()

func (*NewLockerRequest) ProtoReflect added in v4.0.4

func (x *NewLockerRequest) ProtoReflect() protoreflect.Message

func (*NewLockerRequest) Reset added in v4.0.4

func (x *NewLockerRequest) Reset()

func (*NewLockerRequest) String added in v4.0.4

func (x *NewLockerRequest) String() string

func (*NewLockerRequest) Validate added in v4.0.4

func (this *NewLockerRequest) Validate() error

type NewLockerResponse added in v4.0.7

type NewLockerResponse struct {
	Prefix string   `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Type   LockType `protobuf:"varint,2,opt,name=type,proto3,enum=registry.LockType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*NewLockerResponse) Descriptor deprecated added in v4.0.7

func (*NewLockerResponse) Descriptor() ([]byte, []int)

Deprecated: Use NewLockerResponse.ProtoReflect.Descriptor instead.

func (*NewLockerResponse) GetPrefix added in v4.0.7

func (x *NewLockerResponse) GetPrefix() string

func (*NewLockerResponse) GetType added in v4.0.7

func (x *NewLockerResponse) GetType() LockType

func (*NewLockerResponse) ProtoMessage added in v4.0.7

func (*NewLockerResponse) ProtoMessage()

func (*NewLockerResponse) ProtoReflect added in v4.0.7

func (x *NewLockerResponse) ProtoReflect() protoreflect.Message

func (*NewLockerResponse) Reset added in v4.0.7

func (x *NewLockerResponse) Reset()

func (*NewLockerResponse) String added in v4.0.7

func (x *NewLockerResponse) String() string

func (*NewLockerResponse) Validate added in v4.0.7

func (this *NewLockerResponse) Validate() error

type Node

type Node struct {
	Hostname    string   `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Machine     string   `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"`
	Ips         []string `protobuf:"bytes,3,rep,name=ips,proto3" json:"ips,omitempty"`
	AdvertiseIp string   `protobuf:"bytes,4,opt,name=advertiseIp,proto3" json:"advertiseIp,omitempty"`
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

func (*Node) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetAdvertiseIp added in v4.0.1

func (x *Node) GetAdvertiseIp() string

func (*Node) GetHostname added in v4.0.1

func (x *Node) GetHostname() string

func (*Node) GetIps added in v4.0.1

func (x *Node) GetIps() []string

func (*Node) GetMachine added in v4.0.1

func (x *Node) GetMachine() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

func (*Node) Validate

func (this *Node) Validate() error

type Options

type Options struct {
	Ttl       int64        `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"`
	Types     []ItemType   `protobuf:"varint,2,rep,packed,name=types,proto3,enum=registry.ItemType" json:"types,omitempty"`
	Actions   []ActionType `protobuf:"varint,3,rep,packed,name=actions,proto3,enum=registry.ActionType" json:"actions,omitempty"`
	Ids       []string     `protobuf:"bytes,7,rep,name=ids,proto3" json:"ids,omitempty"`
	Names     []string     `protobuf:"bytes,4,rep,name=names,proto3" json:"names,omitempty"`
	MetaName  string       `protobuf:"bytes,5,opt,name=metaName,proto3" json:"metaName,omitempty"`
	MetaValue string       `protobuf:"bytes,6,opt,name=metaValue,proto3" json:"metaValue,omitempty"`
	// contains filtered or unexported fields
}

Options are registry options

func (*Options) Descriptor deprecated

func (*Options) Descriptor() ([]byte, []int)

Deprecated: Use Options.ProtoReflect.Descriptor instead.

func (*Options) GetActions added in v4.0.1

func (x *Options) GetActions() []ActionType

func (*Options) GetIds added in v4.0.6

func (x *Options) GetIds() []string

func (*Options) GetMetaName added in v4.0.1

func (x *Options) GetMetaName() string

func (*Options) GetMetaValue added in v4.0.1

func (x *Options) GetMetaValue() string

func (*Options) GetNames added in v4.0.1

func (x *Options) GetNames() []string

func (*Options) GetTtl

func (x *Options) GetTtl() int64

func (*Options) GetTypes added in v4.0.1

func (x *Options) GetTypes() []ItemType

func (*Options) ProtoMessage

func (*Options) ProtoMessage()

func (*Options) ProtoReflect

func (x *Options) ProtoReflect() protoreflect.Message

func (*Options) Reset

func (x *Options) Reset()

func (*Options) String

func (x *Options) String() string

func (*Options) Validate

func (this *Options) Validate() error

type RegistryClient

type RegistryClient interface {
	Start(ctx context.Context, in *Item, opts ...grpc.CallOption) (*EmptyResponse, error)
	Stop(ctx context.Context, in *Item, opts ...grpc.CallOption) (*EmptyResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Register(ctx context.Context, in *Item, opts ...grpc.CallOption) (*EmptyResponse, error)
	Deregister(ctx context.Context, in *Item, opts ...grpc.CallOption) (*EmptyResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Registry_WatchClient, error)
	NewLocker(ctx context.Context, opts ...grpc.CallOption) (Registry_NewLockerClient, error)
}

RegistryClient is the client API for Registry service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewRegistryClient

func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient

type RegistryEnhancedServer

type RegistryEnhancedServer map[string]NamedRegistryServer

func (RegistryEnhancedServer) Deregister

func (m RegistryEnhancedServer) Deregister(ctx context.Context, r *Item) (*EmptyResponse, error)

func (RegistryEnhancedServer) Get

func (RegistryEnhancedServer) List

func (RegistryEnhancedServer) NewLocker added in v4.0.4

func (RegistryEnhancedServer) Register

func (RegistryEnhancedServer) Start

func (RegistryEnhancedServer) Stop

func (RegistryEnhancedServer) Watch

type RegistryServer

type RegistryServer interface {
	Start(context.Context, *Item) (*EmptyResponse, error)
	Stop(context.Context, *Item) (*EmptyResponse, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Register(context.Context, *Item) (*EmptyResponse, error)
	Deregister(context.Context, *Item) (*EmptyResponse, error)
	List(context.Context, *ListRequest) (*ListResponse, error)
	Watch(*WatchRequest, Registry_WatchServer) error
	NewLocker(Registry_NewLockerServer) error
	// contains filtered or unexported methods
}

RegistryServer is the server API for Registry service. All implementations must embed UnimplementedRegistryServer for forward compatibility

type RegistryStub

type RegistryStub struct {
	RegistryServer
}

func (*RegistryStub) Invoke

func (s *RegistryStub) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error

func (*RegistryStub) NewStream

func (s *RegistryStub) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)

type RegistryStub_NewLockerStreamer added in v4.0.4

type RegistryStub_NewLockerStreamer struct {
	stubs.BidirServerStreamerCore
}

func (*RegistryStub_NewLockerStreamer) Recv added in v4.0.4

func (*RegistryStub_NewLockerStreamer) Send added in v4.0.4

type RegistryStub_WatchStreamer

type RegistryStub_WatchStreamer struct {
	stubs.ClientServerStreamerCore
}

func (*RegistryStub_WatchStreamer) Send

func (s *RegistryStub_WatchStreamer) Send(response *Result) error

type Registry_NewLockerClient added in v4.0.4

type Registry_NewLockerClient interface {
	Send(*NewLockerRequest) error
	Recv() (*NewLockerResponse, error)
	grpc.ClientStream
}

type Registry_NewLockerServer added in v4.0.4

type Registry_NewLockerServer interface {
	Send(*NewLockerResponse) error
	Recv() (*NewLockerRequest, error)
	grpc.ServerStream
}

type Registry_WatchClient

type Registry_WatchClient interface {
	Recv() (*Result, error)
	grpc.ClientStream
}

type Registry_WatchServer

type Registry_WatchServer interface {
	Send(*Result) error
	grpc.ServerStream
}

type Result

type Result struct {
	Action    ActionType `protobuf:"varint,1,opt,name=action,proto3,enum=registry.ActionType" json:"action,omitempty"` // create, update, delete
	Items     []*Item    `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	Timestamp int64      `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // unix timestamp
	// contains filtered or unexported fields
}

Result is returns by the watcher

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetAction

func (x *Result) GetAction() ActionType

func (*Result) GetItems added in v4.0.1

func (x *Result) GetItems() []*Item

func (*Result) GetTimestamp

func (x *Result) GetTimestamp() int64

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

func (*Result) Validate

func (this *Result) Validate() error

type Server added in v4.0.1

type Server struct {
	Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// contains filtered or unexported fields
}

Server represents the node the service is on

func (*Server) Descriptor deprecated added in v4.0.1

func (*Server) Descriptor() ([]byte, []int)

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetProtocol added in v4.0.1

func (x *Server) GetProtocol() string

func (*Server) ProtoMessage added in v4.0.1

func (*Server) ProtoMessage()

func (*Server) ProtoReflect added in v4.0.1

func (x *Server) ProtoReflect() protoreflect.Message

func (*Server) Reset added in v4.0.1

func (x *Server) Reset()

func (*Server) String added in v4.0.1

func (x *Server) String() string

func (*Server) Validate added in v4.0.1

func (this *Server) Validate() error

type Service

type Service struct {
	Version string   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	Tags    []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

Service represents a go-micro service

func (*Service) Descriptor deprecated

func (*Service) Descriptor() ([]byte, []int)

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetOptions

func (x *Service) GetOptions() *Options

func (*Service) GetTags added in v4.0.1

func (x *Service) GetTags() []string

func (*Service) GetVersion

func (x *Service) GetVersion() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

func (x *Service) ProtoReflect() protoreflect.Message

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

func (*Service) Validate

func (this *Service) Validate() error

type StartRequest

type StartRequest struct {
	Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*StartRequest) Descriptor deprecated

func (*StartRequest) Descriptor() ([]byte, []int)

Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.

func (*StartRequest) GetItem

func (x *StartRequest) GetItem() *Item

func (*StartRequest) ProtoMessage

func (*StartRequest) ProtoMessage()

func (*StartRequest) ProtoReflect

func (x *StartRequest) ProtoReflect() protoreflect.Message

func (*StartRequest) Reset

func (x *StartRequest) Reset()

func (*StartRequest) String

func (x *StartRequest) String() string

func (*StartRequest) Validate

func (this *StartRequest) Validate() error

type StopRequest

type StopRequest struct {
	Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*StopRequest) Descriptor deprecated

func (*StopRequest) Descriptor() ([]byte, []int)

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetItem

func (x *StopRequest) GetItem() *Item

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

func (x *StopRequest) ProtoReflect() protoreflect.Message

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

func (*StopRequest) Validate

func (this *StopRequest) Validate() error

type UnimplementedRegistryServer

type UnimplementedRegistryServer struct {
}

UnimplementedRegistryServer must be embedded to have forward compatible implementations.

func (UnimplementedRegistryServer) Deregister

func (UnimplementedRegistryServer) Get

func (UnimplementedRegistryServer) List

func (UnimplementedRegistryServer) NewLocker added in v4.0.4

func (UnimplementedRegistryServer) Register

func (UnimplementedRegistryServer) Start

func (UnimplementedRegistryServer) Stop

func (UnimplementedRegistryServer) Watch

type UnsafeRegistryServer

type UnsafeRegistryServer interface {
	// contains filtered or unexported methods
}

UnsafeRegistryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RegistryServer will result in compilation errors.

type WatchRequest

type WatchRequest struct {
	Name    string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchRequest) Descriptor deprecated

func (*WatchRequest) Descriptor() ([]byte, []int)

Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.

func (*WatchRequest) GetName

func (x *WatchRequest) GetName() string

func (*WatchRequest) GetOptions

func (x *WatchRequest) GetOptions() *Options

func (*WatchRequest) ProtoMessage

func (*WatchRequest) ProtoMessage()

func (*WatchRequest) ProtoReflect

func (x *WatchRequest) ProtoReflect() protoreflect.Message

func (*WatchRequest) Reset

func (x *WatchRequest) Reset()

func (*WatchRequest) String

func (x *WatchRequest) String() string

func (*WatchRequest) Validate

func (this *WatchRequest) Validate() error

Jump to

Keyboard shortcuts

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