registry

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_registry_registry_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ClientCreateFunc

type ClientCreateFunc func(conn *stdgrpc.ClientConn) (interface{}, error)

func (ClientCreateFunc) Create

func (f ClientCreateFunc) Create(conn *stdgrpc.ClientConn) (interface{}, error)

type ClientCreator

type ClientCreator interface {
	Create(conn *stdgrpc.ClientConn) (interface{}, error)
}

type ClientFactory

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

func NewClientFactory

func NewClientFactory(reg FactoryInterface, logger log.Logger, logOpt *log2.LogOption) *ClientFactory

func (*ClientFactory) CreateNewClient

func (f *ClientFactory) CreateNewClient(serviceName string, creator ClientCreator) (interface{}, func(), error)

type DiscoveryRegistrar

type DiscoveryRegistrar interface {
	registry.Discovery
	registry.Registrar
}

type FactoryInterface

type FactoryInterface interface {
	GetRegister() (registry.Registrar, error)
	GetDiscovery() (registry.Discovery, error)
}

func New

type RegistryOption

type RegistryOption struct {
	Provider  string                      `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
	Authority string                      `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
	Local     *RegistryOption_LocalOption `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"`
	Etcd      *RegistryOption_EtcdOption  `protobuf:"bytes,4,opt,name=etcd,proto3" json:"etcd,omitempty"`
	// contains filtered or unexported fields
}

func (*RegistryOption) Descriptor deprecated

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

Deprecated: Use RegistryOption.ProtoReflect.Descriptor instead.

func (*RegistryOption) GetAuthority added in v0.1.2

func (x *RegistryOption) GetAuthority() string

func (*RegistryOption) GetEtcd

func (*RegistryOption) GetLocal

func (*RegistryOption) GetProvider

func (x *RegistryOption) GetProvider() string

func (*RegistryOption) ProtoMessage

func (*RegistryOption) ProtoMessage()

func (*RegistryOption) ProtoReflect

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

func (*RegistryOption) Reset

func (x *RegistryOption) Reset()

func (*RegistryOption) String

func (x *RegistryOption) String() string

type RegistryOption_EtcdOption

type RegistryOption_EtcdOption struct {
	Username  string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password  string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Endpoints []string `protobuf:"bytes,3,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// contains filtered or unexported fields
}

func (*RegistryOption_EtcdOption) Descriptor deprecated

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

Deprecated: Use RegistryOption_EtcdOption.ProtoReflect.Descriptor instead.

func (*RegistryOption_EtcdOption) GetEndpoints

func (x *RegistryOption_EtcdOption) GetEndpoints() []string

func (*RegistryOption_EtcdOption) GetPassword

func (x *RegistryOption_EtcdOption) GetPassword() string

func (*RegistryOption_EtcdOption) GetUsername

func (x *RegistryOption_EtcdOption) GetUsername() string

func (*RegistryOption_EtcdOption) ProtoMessage

func (*RegistryOption_EtcdOption) ProtoMessage()

func (*RegistryOption_EtcdOption) ProtoReflect

func (*RegistryOption_EtcdOption) Reset

func (x *RegistryOption_EtcdOption) Reset()

func (*RegistryOption_EtcdOption) String

func (x *RegistryOption_EtcdOption) String() string

type RegistryOption_LocalOption

type RegistryOption_LocalOption struct {
	Entries []*RegistryOption_LocalOption_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

func (*RegistryOption_LocalOption) Descriptor deprecated

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

Deprecated: Use RegistryOption_LocalOption.ProtoReflect.Descriptor instead.

func (*RegistryOption_LocalOption) GetEntries

func (*RegistryOption_LocalOption) ProtoMessage

func (*RegistryOption_LocalOption) ProtoMessage()

func (*RegistryOption_LocalOption) ProtoReflect

func (*RegistryOption_LocalOption) Reset

func (x *RegistryOption_LocalOption) Reset()

func (*RegistryOption_LocalOption) String

func (x *RegistryOption_LocalOption) String() string

type RegistryOption_LocalOption_Entry

type RegistryOption_LocalOption_Entry 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"`
	Version   string   `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Endpoints []string `protobuf:"bytes,4,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// contains filtered or unexported fields
}

func (*RegistryOption_LocalOption_Entry) Descriptor deprecated

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

Deprecated: Use RegistryOption_LocalOption_Entry.ProtoReflect.Descriptor instead.

func (*RegistryOption_LocalOption_Entry) GetEndpoints

func (x *RegistryOption_LocalOption_Entry) GetEndpoints() []string

func (*RegistryOption_LocalOption_Entry) GetId

func (*RegistryOption_LocalOption_Entry) GetName

func (*RegistryOption_LocalOption_Entry) GetVersion

func (x *RegistryOption_LocalOption_Entry) GetVersion() string

func (*RegistryOption_LocalOption_Entry) ProtoMessage

func (*RegistryOption_LocalOption_Entry) ProtoMessage()

func (*RegistryOption_LocalOption_Entry) ProtoReflect

func (*RegistryOption_LocalOption_Entry) Reset

func (*RegistryOption_LocalOption_Entry) String

Jump to

Keyboard shortcuts

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