Documentation ¶
Overview ¶
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func NewDialer(addr string, opts ...grpc.DialOption) *dialer
- func RegisterCSRHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCSRHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CSRClient) error
- func RegisterCSRHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCSRHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CSRServer) error
- func RegisterCSRServer(s grpc.ServiceRegistrar, srv CSRServer)
- func RegisterRegistryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRegistryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegistryClient) error
- func RegisterRegistryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegistryServer) error
- func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer)
- type ActionOnRegisterExistingService
- func (ActionOnRegisterExistingService) Descriptor() protoreflect.EnumDescriptor
- func (x ActionOnRegisterExistingService) Enum() *ActionOnRegisterExistingService
- func (ActionOnRegisterExistingService) EnumDescriptor() ([]byte, []int)deprecated
- func (x ActionOnRegisterExistingService) Number() protoreflect.EnumNumber
- func (x ActionOnRegisterExistingService) String() string
- func (ActionOnRegisterExistingService) Type() protoreflect.EnumType
- type CSRClient
- type CSRData
- func (*CSRData) Descriptor() ([]byte, []int)deprecated
- func (x *CSRData) GetAddresses() []string
- func (x *CSRData) GetDomains() []string
- func (x *CSRData) GetPublicKey() []byte
- func (x *CSRData) GetSubject() string
- func (*CSRData) ProtoMessage()
- func (x *CSRData) ProtoReflect() protoreflect.Message
- func (x *CSRData) Reset()
- func (x *CSRData) String() string
- type CSRServer
- type ConnectionInfo
- func (*ConnectionInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectionInfo) GetAddress() string
- func (x *ConnectionInfo) GetCertificate() []byte
- func (x *ConnectionInfo) GetProtocol() Protocol
- func (*ConnectionInfo) ProtoMessage()
- func (x *ConnectionInfo) ProtoReflect() protoreflect.Message
- func (x *ConnectionInfo) Reset()
- func (x *ConnectionInfo) String() string
- type ConnectionPool
- type DeregisterRequest
- func (*DeregisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeregisterRequest) GetNodes() []string
- func (x *DeregisterRequest) GetRegistryId() string
- func (*DeregisterRequest) ProtoMessage()
- func (x *DeregisterRequest) ProtoReflect() protoreflect.Message
- func (x *DeregisterRequest) Reset()
- func (x *DeregisterRequest) String() string
- type DeregisterResponse
- type Dialer
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetInfo() *Info
- func (x *Event) GetOnRegisterExisting() ActionOnRegisterExistingService
- func (x *Event) GetServiceId() string
- func (x *Event) GetType() EventType
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventHandler
- type EventHandlerFunc
- type EventType
- type GetRequest
- type GetResponse
- type Info
- func (*Info) Descriptor() ([]byte, []int)deprecated
- func (x *Info) GetId() string
- func (x *Info) GetLabel() string
- func (x *Info) GetMeta() map[string]string
- func (x *Info) GetNodes() []*Node
- func (x *Info) GetType() Type
- func (*Info) ProtoMessage()
- func (x *Info) ProtoReflect() protoreflect.Message
- func (x *Info) Reset()
- func (x *Info) String() string
- type ListRequest
- type ListResponse
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetAddress() string
- func (x *Node) GetId() string
- func (x *Node) GetMeta() map[string]string
- func (x *Node) GetProtocol() Protocol
- func (x *Node) GetSecurity() Security
- func (x *Node) GetTtl() int64
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- type PoolOption
- type Protocol
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetAction() ActionOnRegisterExistingService
- func (x *RegisterRequest) GetService() *Info
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- type Registry
- type RegistryClient
- type RegistryServer
- type Registry_ListenClient
- type Registry_ListenServer
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetNamespace() string
- func (x *SearchRequest) GetType() Type
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (x *SearchRequest) String() string
- type SearchResponse
- type Security
- type Selector
- type SignCertificateRequest
- func (*SignCertificateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignCertificateRequest) GetCsr() *CSRData
- func (*SignCertificateRequest) ProtoMessage()
- func (x *SignCertificateRequest) ProtoReflect() protoreflect.Message
- func (x *SignCertificateRequest) Reset()
- func (x *SignCertificateRequest) String() string
- type SignCertificateResponse
- func (*SignCertificateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SignCertificateResponse) GetRawCertificate() []byte
- func (*SignCertificateResponse) ProtoMessage()
- func (x *SignCertificateResponse) ProtoReflect() protoreflect.Message
- func (x *SignCertificateResponse) Reset()
- func (x *SignCertificateResponse) String() string
- type State
- type Status
- type Type
- type UnimplementedCSRServer
- type UnimplementedRegistryServer
- func (UnimplementedRegistryServer) Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error)
- func (UnimplementedRegistryServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedRegistryServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedRegistryServer) Listen(Registry_ListenServer) error
- func (UnimplementedRegistryServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
- func (UnimplementedRegistryServer) Search(context.Context, *SearchRequest) (*SearchResponse, error)
- type UnsafeCSRServer
- type UnsafeRegistryServer
Constants ¶
This section is empty.
Variables ¶
var ( Protocol_name = map[int32]string{ 0: "Unknown", 1: "Grpc", 2: "Http", } Protocol_value = map[string]int32{ "Unknown": 0, "Grpc": 1, "Http": 2, } )
Enum value maps for Protocol.
var ( Type_name = map[int32]string{ 0: "UnknownType", 1: "CA", 2: "Auth", 3: "Organization", 4: "TokenStore", 5: "Data", 6: "FileStorage", 7: "AppStore", 8: "Accounts", 9: "Files", } Type_value = map[string]int32{ "UnknownType": 0, "CA": 1, "Auth": 2, "Organization": 3, "TokenStore": 4, "Data": 5, "FileStorage": 6, "AppStore": 7, "Accounts": 8, "Files": 9, } )
Enum value maps for Type.
var ( Security_name = map[int32]string{ 0: "None", 1: "TLS", 2: "ACME", 3: "MutualTLS", } Security_value = map[string]int32{ "None": 0, "TLS": 1, "ACME": 2, "MutualTLS": 3, } )
Enum value maps for Security.
var ( Status_name = map[int32]string{ 0: "UnknownStatus", 1: "Running", 2: "Stopped", } Status_value = map[string]int32{ "UnknownStatus": 0, "Running": 1, "Stopped": 2, } )
Enum value maps for Status.
var ( EventType_name = map[int32]string{ 0: "UnknownEvent", 1: "Register", 2: "DeRegister", 3: "DeRegisterNode", 4: "Update", } EventType_value = map[string]int32{ "UnknownEvent": 0, "Register": 1, "DeRegister": 2, "DeRegisterNode": 3, "Update": 4, } )
Enum value maps for EventType.
var ( ActionOnRegisterExistingService_name = map[int32]string{ 0: "Replace", 1: "UpdateExisting", 2: "AddNodes", 4: "RemoveOld", } ActionOnRegisterExistingService_value = map[string]int32{ "Replace": 0, "UpdateExisting": 1, "AddNodes": 2, "RemoveOld": 4, } )
Enum value maps for ActionOnRegisterExistingService.
var File_ca_proto protoreflect.FileDescriptor
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func NewDialer ¶
func NewDialer(addr string, opts ...grpc.DialOption) *dialer
func RegisterCSRHandler ¶
RegisterCSRHandler registers the http handlers for service CSR to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCSRHandlerClient ¶
RegisterCSRHandlerClient registers the http handlers for service CSR to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CSRClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CSRClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CSRClient" to call the correct interceptors.
func RegisterCSRHandlerFromEndpoint ¶
func RegisterCSRHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCSRHandlerFromEndpoint is same as RegisterCSRHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCSRHandlerServer ¶
RegisterCSRHandlerServer registers the http handlers for service CSR to "mux". UnaryRPC :call CSRServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCSRHandlerFromEndpoint instead.
func RegisterCSRServer ¶
func RegisterCSRServer(s grpc.ServiceRegistrar, srv CSRServer)
func RegisterRegistryHandler ¶
func RegisterRegistryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterRegistryHandler registers the http handlers for service Registry to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRegistryHandlerClient ¶
func RegisterRegistryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegistryClient) error
RegisterRegistryHandlerClient registers the http handlers for service Registry to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RegistryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RegistryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RegistryClient" to call the correct interceptors.
func RegisterRegistryHandlerFromEndpoint ¶
func RegisterRegistryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRegistryHandlerFromEndpoint is same as RegisterRegistryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRegistryHandlerServer ¶
func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegistryServer) error
RegisterRegistryHandlerServer registers the http handlers for service Registry to "mux". UnaryRPC :call RegistryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRegistryHandlerFromEndpoint instead.
func RegisterRegistryServer ¶
func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer)
Types ¶
type ActionOnRegisterExistingService ¶
type ActionOnRegisterExistingService int32
const ( ActionOnRegisterExistingService_Replace ActionOnRegisterExistingService = 0 ActionOnRegisterExistingService_UpdateExisting ActionOnRegisterExistingService = 1 ActionOnRegisterExistingService_AddNodes ActionOnRegisterExistingService = 2 ActionOnRegisterExistingService_RemoveOld ActionOnRegisterExistingService = 4 )
func (ActionOnRegisterExistingService) Descriptor ¶
func (ActionOnRegisterExistingService) Descriptor() protoreflect.EnumDescriptor
func (ActionOnRegisterExistingService) Enum ¶
func (x ActionOnRegisterExistingService) Enum() *ActionOnRegisterExistingService
func (ActionOnRegisterExistingService) EnumDescriptor
deprecated
func (ActionOnRegisterExistingService) EnumDescriptor() ([]byte, []int)
Deprecated: Use ActionOnRegisterExistingService.Descriptor instead.
func (ActionOnRegisterExistingService) Number ¶
func (x ActionOnRegisterExistingService) Number() protoreflect.EnumNumber
func (ActionOnRegisterExistingService) String ¶
func (x ActionOnRegisterExistingService) String() string
func (ActionOnRegisterExistingService) Type ¶
func (ActionOnRegisterExistingService) Type() protoreflect.EnumType
type CSRClient ¶
type CSRClient interface {
SignCertificate(ctx context.Context, in *SignCertificateRequest, opts ...grpc.CallOption) (*SignCertificateResponse, error)
}
CSRClient is the client API for CSR 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 NewCSRClient ¶
func NewCSRClient(cc grpc.ClientConnInterface) CSRClient
type CSRData ¶
type CSRData struct { Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // contains filtered or unexported fields }
func (*CSRData) Descriptor
deprecated
func (*CSRData) GetAddresses ¶
func (*CSRData) GetDomains ¶
func (*CSRData) GetPublicKey ¶
func (*CSRData) GetSubject ¶
func (*CSRData) ProtoMessage ¶
func (*CSRData) ProtoMessage()
func (*CSRData) ProtoReflect ¶
func (x *CSRData) ProtoReflect() protoreflect.Message
type CSRServer ¶
type CSRServer interface { SignCertificate(context.Context, *SignCertificateRequest) (*SignCertificateResponse, error) // contains filtered or unexported methods }
CSRServer is the server API for CSR service. All implementations must embed UnimplementedCSRServer for forward compatibility
type ConnectionInfo ¶
type ConnectionInfo struct { Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=Protocol" json:"protocol,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` Certificate []byte `protobuf:"bytes,3,opt,name=Certificate,proto3" json:"Certificate,omitempty"` // contains filtered or unexported fields }
func (*ConnectionInfo) Descriptor
deprecated
func (*ConnectionInfo) Descriptor() ([]byte, []int)
Deprecated: Use ConnectionInfo.ProtoReflect.Descriptor instead.
func (*ConnectionInfo) GetAddress ¶
func (x *ConnectionInfo) GetAddress() string
func (*ConnectionInfo) GetCertificate ¶
func (x *ConnectionInfo) GetCertificate() []byte
func (*ConnectionInfo) GetProtocol ¶
func (x *ConnectionInfo) GetProtocol() Protocol
func (*ConnectionInfo) ProtoMessage ¶
func (*ConnectionInfo) ProtoMessage()
func (*ConnectionInfo) ProtoReflect ¶
func (x *ConnectionInfo) ProtoReflect() protoreflect.Message
func (*ConnectionInfo) Reset ¶
func (x *ConnectionInfo) Reset()
func (*ConnectionInfo) String ¶
func (x *ConnectionInfo) String() string
type ConnectionPool ¶
type ConnectionPool interface { Dialer(name string) (Dialer, error) Connection(name string, opts ...grpc.DialOption) (*grpc.ClientConn, error) }
func NewConnectionPool ¶
func NewConnectionPool(registry Registry, opts ...PoolOption) ConnectionPool
type DeregisterRequest ¶
type DeregisterRequest struct { RegistryId string `protobuf:"bytes,1,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"` Nodes []string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*DeregisterRequest) Descriptor
deprecated
func (*DeregisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeregisterRequest.ProtoReflect.Descriptor instead.
func (*DeregisterRequest) GetNodes ¶
func (x *DeregisterRequest) GetNodes() []string
func (*DeregisterRequest) GetRegistryId ¶
func (x *DeregisterRequest) GetRegistryId() string
func (*DeregisterRequest) ProtoMessage ¶
func (*DeregisterRequest) ProtoMessage()
func (*DeregisterRequest) ProtoReflect ¶
func (x *DeregisterRequest) ProtoReflect() protoreflect.Message
func (*DeregisterRequest) Reset ¶
func (x *DeregisterRequest) Reset()
func (*DeregisterRequest) String ¶
func (x *DeregisterRequest) String() string
type DeregisterResponse ¶
type DeregisterResponse struct {
// contains filtered or unexported fields
}
func (*DeregisterResponse) Descriptor
deprecated
func (*DeregisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeregisterResponse.ProtoReflect.Descriptor instead.
func (*DeregisterResponse) ProtoMessage ¶
func (*DeregisterResponse) ProtoMessage()
func (*DeregisterResponse) ProtoReflect ¶
func (x *DeregisterResponse) ProtoReflect() protoreflect.Message
func (*DeregisterResponse) Reset ¶
func (x *DeregisterResponse) Reset()
func (*DeregisterResponse) String ¶
func (x *DeregisterResponse) String() string
type Dialer ¶
type Dialer interface {
Dial(opts ...grpc.DialOption) (*grpc.ClientConn, error)
}
type Event ¶
type Event struct { Type EventType `protobuf:"varint,1,opt,name=type,proto3,enum=EventType" json:"type,omitempty"` ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` Info *Info `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` OnRegisterExisting ActionOnRegisterExistingService `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetOnRegisterExisting ¶
func (x *Event) GetOnRegisterExisting() ActionOnRegisterExistingService
func (*Event) GetServiceId ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventHandler ¶
type EventHandler interface {
Handle(*Event)
}
type EventHandlerFunc ¶
type EventHandlerFunc func(*Event)
func (EventHandlerFunc) Handle ¶
func (h EventHandlerFunc) Handle(event *Event)
type EventType ¶
type EventType int32
func (EventType) Descriptor ¶
func (EventType) Descriptor() protoreflect.EnumDescriptor
func (EventType) EnumDescriptor
deprecated
func (EventType) Number ¶
func (x EventType) Number() protoreflect.EnumNumber
func (EventType) Type ¶
func (EventType) Type() protoreflect.EnumType
type GetRequest ¶
type GetRequest struct { RegistryId string `protobuf:"bytes,1,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetRegistryId ¶
func (x *GetRequest) GetRegistryId() string
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
type GetResponse ¶
type GetResponse struct { Info *Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetInfo ¶
func (x *GetResponse) GetInfo() *Info
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
type Info ¶
type Info struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=Type" json:"type,omitempty"` Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` Nodes []*Node `protobuf:"bytes,4,rep,name=nodes,proto3" json:"nodes,omitempty"` Meta map[string]string `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Info) Descriptor
deprecated
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
func (*Info) ProtoReflect ¶
func (x *Info) ProtoReflect() protoreflect.Message
type ListRequest ¶
type ListRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetNamespace ¶
func (x *ListRequest) GetNamespace() string
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
type ListResponse ¶
type ListResponse struct { Applications []*Info `protobuf:"bytes,1,rep,name=applications,proto3" json:"applications,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetApplications ¶
func (x *ListResponse) GetApplications() []*Info
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
type Node ¶
type Node struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Protocol Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=Protocol" json:"protocol,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` Security Security `protobuf:"varint,4,opt,name=security,proto3,enum=Security" json:"security,omitempty"` Ttl int64 `protobuf:"varint,5,opt,name=ttl,proto3" json:"ttl,omitempty"` Meta map[string]string `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Node) Descriptor
deprecated
func (*Node) GetAddress ¶
func (*Node) GetProtocol ¶
func (*Node) GetSecurity ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type PoolOption ¶
type PoolOption func(p *poolOptions)
func CACert ¶
func CACert(filename string) PoolOption
func Cert ¶
func Cert(filename string) PoolOption
func Key ¶
func Key(filename string, password []byte) PoolOption
type Protocol ¶
type Protocol int32
func (Protocol) Descriptor ¶
func (Protocol) Descriptor() protoreflect.EnumDescriptor
func (Protocol) EnumDescriptor
deprecated
func (Protocol) Number ¶
func (x Protocol) Number() protoreflect.EnumNumber
func (Protocol) Type ¶
func (Protocol) Type() protoreflect.EnumType
type RegisterRequest ¶
type RegisterRequest struct { Service *Info `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` Action ActionOnRegisterExistingService `protobuf:"varint,2,opt,name=action,proto3,enum=ActionOnRegisterExistingService" json:"action,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetAction ¶
func (x *RegisterRequest) GetAction() ActionOnRegisterExistingService
func (*RegisterRequest) GetService ¶
func (x *RegisterRequest) GetService() *Info
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct { RegistryId string `protobuf:"bytes,1,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetRegistryId ¶
func (x *RegisterResponse) GetRegistryId() string
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type Registry ¶
type Registry interface { RegisterService(info *Info) error DeregisterService(id string, nodes ...string) error GetService(id string) (*Info, error) GetNode(id string, nodeId string) (*Node, error) Certificate(id string) ([]byte, error) ConnectionInfo(id string, protocol Protocol) (*ConnectionInfo, error) RegisterEventHandler(h EventHandler) string DeregisterEventHandler(string) GetOfType(t Type) ([]*Info, error) FirstOfType(t Type) (*Info, error) Stop() error }
type RegistryClient ¶
type RegistryClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Deregister(ctx context.Context, in *DeregisterRequest, opts ...grpc.CallOption) (*DeregisterResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) Listen(ctx context.Context, opts ...grpc.CallOption) (Registry_ListenClient, 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 RegistryServer ¶
type RegistryServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) Search(context.Context, *SearchRequest) (*SearchResponse, error) Listen(Registry_ListenServer) error // contains filtered or unexported methods }
RegistryServer is the server API for Registry service. All implementations must embed UnimplementedRegistryServer for forward compatibility
type Registry_ListenClient ¶
type Registry_ListenServer ¶
type SearchRequest ¶
type SearchRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=Type" json:"type,omitempty"` // contains filtered or unexported fields }
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetNamespace ¶
func (x *SearchRequest) GetNamespace() string
func (*SearchRequest) GetType ¶
func (x *SearchRequest) GetType() Type
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type SearchResponse ¶
type SearchResponse struct { Services []*Info `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` // contains filtered or unexported fields }
func (*SearchResponse) Descriptor
deprecated
func (*SearchResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.
func (*SearchResponse) GetServices ¶
func (x *SearchResponse) GetServices() []*Info
func (*SearchResponse) ProtoMessage ¶
func (*SearchResponse) ProtoMessage()
func (*SearchResponse) ProtoReflect ¶
func (x *SearchResponse) ProtoReflect() protoreflect.Message
func (*SearchResponse) Reset ¶
func (x *SearchResponse) Reset()
func (*SearchResponse) String ¶
func (x *SearchResponse) String() string
type Security ¶
type Security int32
func (Security) Descriptor ¶
func (Security) Descriptor() protoreflect.EnumDescriptor
func (Security) EnumDescriptor
deprecated
func (Security) Number ¶
func (x Security) Number() protoreflect.EnumNumber
func (Security) Type ¶
func (Security) Type() protoreflect.EnumType
type SignCertificateRequest ¶
type SignCertificateRequest struct { Csr *CSRData `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"` // contains filtered or unexported fields }
func (*SignCertificateRequest) Descriptor
deprecated
func (*SignCertificateRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignCertificateRequest.ProtoReflect.Descriptor instead.
func (*SignCertificateRequest) GetCsr ¶
func (x *SignCertificateRequest) GetCsr() *CSRData
func (*SignCertificateRequest) ProtoMessage ¶
func (*SignCertificateRequest) ProtoMessage()
func (*SignCertificateRequest) ProtoReflect ¶
func (x *SignCertificateRequest) ProtoReflect() protoreflect.Message
func (*SignCertificateRequest) Reset ¶
func (x *SignCertificateRequest) Reset()
func (*SignCertificateRequest) String ¶
func (x *SignCertificateRequest) String() string
type SignCertificateResponse ¶
type SignCertificateResponse struct { RawCertificate []byte `protobuf:"bytes,1,opt,name=raw_certificate,json=rawCertificate,proto3" json:"raw_certificate,omitempty"` // contains filtered or unexported fields }
func (*SignCertificateResponse) Descriptor
deprecated
func (*SignCertificateResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignCertificateResponse.ProtoReflect.Descriptor instead.
func (*SignCertificateResponse) GetRawCertificate ¶
func (x *SignCertificateResponse) GetRawCertificate() []byte
func (*SignCertificateResponse) ProtoMessage ¶
func (*SignCertificateResponse) ProtoMessage()
func (*SignCertificateResponse) ProtoReflect ¶
func (x *SignCertificateResponse) ProtoReflect() protoreflect.Message
func (*SignCertificateResponse) Reset ¶
func (x *SignCertificateResponse) Reset()
func (*SignCertificateResponse) String ¶
func (x *SignCertificateResponse) String() string
type State ¶
type State struct { Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=Status" json:"status,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*State) Descriptor
deprecated
func (*State) GetMetadata ¶
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) ProtoReflect ¶
func (x *State) ProtoReflect() protoreflect.Message
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type Type ¶
type Type int32
func (Type) Descriptor ¶
func (Type) Descriptor() protoreflect.EnumDescriptor
func (Type) EnumDescriptor
deprecated
func (Type) Number ¶
func (x Type) Number() protoreflect.EnumNumber
func (Type) Type ¶
func (Type) Type() protoreflect.EnumType
type UnimplementedCSRServer ¶
type UnimplementedCSRServer struct { }
UnimplementedCSRServer must be embedded to have forward compatible implementations.
func (UnimplementedCSRServer) SignCertificate ¶
func (UnimplementedCSRServer) SignCertificate(context.Context, *SignCertificateRequest) (*SignCertificateResponse, error)
type UnimplementedRegistryServer ¶
type UnimplementedRegistryServer struct { }
UnimplementedRegistryServer must be embedded to have forward compatible implementations.
func (UnimplementedRegistryServer) Deregister ¶
func (UnimplementedRegistryServer) Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error)
func (UnimplementedRegistryServer) Get ¶
func (UnimplementedRegistryServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedRegistryServer) List ¶
func (UnimplementedRegistryServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedRegistryServer) Listen ¶
func (UnimplementedRegistryServer) Listen(Registry_ListenServer) error
func (UnimplementedRegistryServer) Register ¶
func (UnimplementedRegistryServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
func (UnimplementedRegistryServer) Search ¶
func (UnimplementedRegistryServer) Search(context.Context, *SearchRequest) (*SearchResponse, error)
type UnsafeCSRServer ¶
type UnsafeCSRServer interface {
// contains filtered or unexported methods
}
UnsafeCSRServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CSRServer will result in compilation errors.
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.