Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
stela.proto
It has these top-level messages:
ServiceMessage AddClientRequest ConnectRequest SubscribeRequest RegisterRequest DiscoverRequest DiscoverAllRequest AddClientResponse SubscribeResponse RegisterResponse NotifyResponse DiscoverResponse
Index ¶
- func RegisterStelaServer(s *grpc.Server, srv StelaServer)
- type AddClientRequest
- type AddClientResponse
- type ConnectRequest
- type DiscoverAllRequest
- type DiscoverRequest
- type DiscoverResponse
- type NotifyResponse
- type RegisterRequest
- type RegisterResponse
- type ServiceMessage
- func (*ServiceMessage) Descriptor() ([]byte, []int)
- func (m *ServiceMessage) GetAction() int32
- func (m *ServiceMessage) GetHostname() string
- func (m *ServiceMessage) GetIPv4() string
- func (m *ServiceMessage) GetIPv6() string
- func (m *ServiceMessage) GetName() string
- func (m *ServiceMessage) GetPort() int32
- func (m *ServiceMessage) GetPriority() int32
- func (m *ServiceMessage) GetValue() []byte
- func (*ServiceMessage) ProtoMessage()
- func (m *ServiceMessage) Reset()
- func (m *ServiceMessage) String() string
- type StelaClient
- type StelaServer
- type Stela_ConnectClient
- type Stela_ConnectServer
- type SubscribeRequest
- type SubscribeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterStelaServer ¶
func RegisterStelaServer(s *grpc.Server, srv StelaServer)
Types ¶
type AddClientRequest ¶
type AddClientRequest struct {
ClientAddress string `protobuf:"bytes,1,opt,name=client_address,json=clientAddress" json:"client_address,omitempty"`
}
Request
func (*AddClientRequest) Descriptor ¶
func (*AddClientRequest) Descriptor() ([]byte, []int)
func (*AddClientRequest) GetClientAddress ¶
func (m *AddClientRequest) GetClientAddress() string
func (*AddClientRequest) ProtoMessage ¶
func (*AddClientRequest) ProtoMessage()
func (*AddClientRequest) Reset ¶
func (m *AddClientRequest) Reset()
func (*AddClientRequest) String ¶
func (m *AddClientRequest) String() string
type AddClientResponse ¶
type AddClientResponse struct {
ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId" json:"client_id,omitempty"`
}
Response
func (*AddClientResponse) Descriptor ¶
func (*AddClientResponse) Descriptor() ([]byte, []int)
func (*AddClientResponse) GetClientId ¶
func (m *AddClientResponse) GetClientId() string
func (*AddClientResponse) ProtoMessage ¶
func (*AddClientResponse) ProtoMessage()
func (*AddClientResponse) Reset ¶
func (m *AddClientResponse) Reset()
func (*AddClientResponse) String ¶
func (m *AddClientResponse) String() string
type ConnectRequest ¶
type ConnectRequest struct {
ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId" json:"client_id,omitempty"`
}
func (*ConnectRequest) Descriptor ¶
func (*ConnectRequest) Descriptor() ([]byte, []int)
func (*ConnectRequest) GetClientId ¶
func (m *ConnectRequest) GetClientId() string
func (*ConnectRequest) ProtoMessage ¶
func (*ConnectRequest) ProtoMessage()
func (*ConnectRequest) Reset ¶
func (m *ConnectRequest) Reset()
func (*ConnectRequest) String ¶
func (m *ConnectRequest) String() string
type DiscoverAllRequest ¶
type DiscoverAllRequest struct { }
func (*DiscoverAllRequest) Descriptor ¶
func (*DiscoverAllRequest) Descriptor() ([]byte, []int)
func (*DiscoverAllRequest) ProtoMessage ¶
func (*DiscoverAllRequest) ProtoMessage()
func (*DiscoverAllRequest) Reset ¶
func (m *DiscoverAllRequest) Reset()
func (*DiscoverAllRequest) String ¶
func (m *DiscoverAllRequest) String() string
type DiscoverRequest ¶
type DiscoverRequest struct {
ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName" json:"service_name,omitempty"`
}
func (*DiscoverRequest) Descriptor ¶
func (*DiscoverRequest) Descriptor() ([]byte, []int)
func (*DiscoverRequest) GetServiceName ¶
func (m *DiscoverRequest) GetServiceName() string
func (*DiscoverRequest) ProtoMessage ¶
func (*DiscoverRequest) ProtoMessage()
func (*DiscoverRequest) Reset ¶
func (m *DiscoverRequest) Reset()
func (*DiscoverRequest) String ¶
func (m *DiscoverRequest) String() string
type DiscoverResponse ¶
type DiscoverResponse struct {
Services []*ServiceMessage `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"`
}
func (*DiscoverResponse) Descriptor ¶
func (*DiscoverResponse) Descriptor() ([]byte, []int)
func (*DiscoverResponse) GetServices ¶
func (m *DiscoverResponse) GetServices() []*ServiceMessage
func (*DiscoverResponse) ProtoMessage ¶
func (*DiscoverResponse) ProtoMessage()
func (*DiscoverResponse) Reset ¶
func (m *DiscoverResponse) Reset()
func (*DiscoverResponse) String ¶
func (m *DiscoverResponse) String() string
type NotifyResponse ¶
type NotifyResponse struct { }
func (*NotifyResponse) Descriptor ¶
func (*NotifyResponse) Descriptor() ([]byte, []int)
func (*NotifyResponse) ProtoMessage ¶
func (*NotifyResponse) ProtoMessage()
func (*NotifyResponse) Reset ¶
func (m *NotifyResponse) Reset()
func (*NotifyResponse) String ¶
func (m *NotifyResponse) String() string
type RegisterRequest ¶
type RegisterRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId" json:"client_id,omitempty"` Service *ServiceMessage `protobuf:"bytes,2,opt,name=service" json:"service,omitempty"` }
func (*RegisterRequest) Descriptor ¶
func (*RegisterRequest) Descriptor() ([]byte, []int)
func (*RegisterRequest) GetClientId ¶
func (m *RegisterRequest) GetClientId() string
func (*RegisterRequest) GetService ¶
func (m *RegisterRequest) GetService() *ServiceMessage
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) Reset ¶
func (m *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (m *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct { }
func (*RegisterResponse) Descriptor ¶
func (*RegisterResponse) Descriptor() ([]byte, []int)
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) Reset ¶
func (m *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (m *RegisterResponse) String() string
type ServiceMessage ¶
type ServiceMessage struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Hostname string `protobuf:"bytes,2,opt,name=hostname" json:"hostname,omitempty"` IPv4 string `protobuf:"bytes,3,opt,name=IPv4" json:"IPv4,omitempty"` IPv6 string `protobuf:"bytes,4,opt,name=IPv6" json:"IPv6,omitempty"` Port int32 `protobuf:"varint,5,opt,name=port" json:"port,omitempty"` Priority int32 `protobuf:"varint,6,opt,name=priority" json:"priority,omitempty"` Action int32 `protobuf:"varint,7,opt,name=action" json:"action,omitempty"` Value []byte `protobuf:"bytes,8,opt,name=value,proto3" json:"value,omitempty"` }
func (*ServiceMessage) Descriptor ¶
func (*ServiceMessage) Descriptor() ([]byte, []int)
func (*ServiceMessage) GetAction ¶
func (m *ServiceMessage) GetAction() int32
func (*ServiceMessage) GetHostname ¶
func (m *ServiceMessage) GetHostname() string
func (*ServiceMessage) GetIPv4 ¶
func (m *ServiceMessage) GetIPv4() string
func (*ServiceMessage) GetIPv6 ¶
func (m *ServiceMessage) GetIPv6() string
func (*ServiceMessage) GetName ¶
func (m *ServiceMessage) GetName() string
func (*ServiceMessage) GetPort ¶
func (m *ServiceMessage) GetPort() int32
func (*ServiceMessage) GetPriority ¶
func (m *ServiceMessage) GetPriority() int32
func (*ServiceMessage) GetValue ¶
func (m *ServiceMessage) GetValue() []byte
func (*ServiceMessage) ProtoMessage ¶
func (*ServiceMessage) ProtoMessage()
func (*ServiceMessage) Reset ¶
func (m *ServiceMessage) Reset()
func (*ServiceMessage) String ¶
func (m *ServiceMessage) String() string
type StelaClient ¶
type StelaClient interface { AddClient(ctx context.Context, in *AddClientRequest, opts ...grpc.CallOption) (*AddClientResponse, error) Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (Stela_ConnectClient, error) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) Unsubscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Deregister(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) NotifyClients(ctx context.Context, in *ServiceMessage, opts ...grpc.CallOption) (*NotifyResponse, error) // Peer related RPC is used to request all peer members Discover(ctx context.Context, in *DiscoverRequest, opts ...grpc.CallOption) (*DiscoverResponse, error) DiscoverRegex(ctx context.Context, in *DiscoverRequest, opts ...grpc.CallOption) (*DiscoverResponse, error) DiscoverOne(ctx context.Context, in *DiscoverRequest, opts ...grpc.CallOption) (*ServiceMessage, error) DiscoverAll(ctx context.Context, in *DiscoverAllRequest, opts ...grpc.CallOption) (*DiscoverResponse, error) // Instance related RPC used to discover only the services registered with the // instance you are connected to. InstanceDiscover(ctx context.Context, in *DiscoverRequest, opts ...grpc.CallOption) (*DiscoverResponse, error) InstanceDiscoverRegex(ctx context.Context, in *DiscoverRequest, opts ...grpc.CallOption) (*DiscoverResponse, error) InstanceDiscoverOne(ctx context.Context, in *DiscoverRequest, opts ...grpc.CallOption) (*ServiceMessage, error) InstanceDiscoverAll(ctx context.Context, in *DiscoverAllRequest, opts ...grpc.CallOption) (*DiscoverResponse, error) }
func NewStelaClient ¶
func NewStelaClient(cc *grpc.ClientConn) StelaClient
type StelaServer ¶
type StelaServer interface { AddClient(context.Context, *AddClientRequest) (*AddClientResponse, error) Connect(*ConnectRequest, Stela_ConnectServer) error Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) Unsubscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Deregister(context.Context, *RegisterRequest) (*RegisterResponse, error) NotifyClients(context.Context, *ServiceMessage) (*NotifyResponse, error) // Peer related RPC is used to request all peer members Discover(context.Context, *DiscoverRequest) (*DiscoverResponse, error) DiscoverRegex(context.Context, *DiscoverRequest) (*DiscoverResponse, error) DiscoverOne(context.Context, *DiscoverRequest) (*ServiceMessage, error) DiscoverAll(context.Context, *DiscoverAllRequest) (*DiscoverResponse, error) // Instance related RPC used to discover only the services registered with the // instance you are connected to. InstanceDiscover(context.Context, *DiscoverRequest) (*DiscoverResponse, error) InstanceDiscoverRegex(context.Context, *DiscoverRequest) (*DiscoverResponse, error) InstanceDiscoverOne(context.Context, *DiscoverRequest) (*ServiceMessage, error) InstanceDiscoverAll(context.Context, *DiscoverAllRequest) (*DiscoverResponse, error) }
type Stela_ConnectClient ¶
type Stela_ConnectClient interface { Recv() (*ServiceMessage, error) grpc.ClientStream }
type Stela_ConnectServer ¶
type Stela_ConnectServer interface { Send(*ServiceMessage) error grpc.ServerStream }
type SubscribeRequest ¶
type SubscribeRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId" json:"client_id,omitempty"` ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName" json:"service_name,omitempty"` }
func (*SubscribeRequest) Descriptor ¶
func (*SubscribeRequest) Descriptor() ([]byte, []int)
func (*SubscribeRequest) GetClientId ¶
func (m *SubscribeRequest) GetClientId() string
func (*SubscribeRequest) GetServiceName ¶
func (m *SubscribeRequest) GetServiceName() string
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) Reset ¶
func (m *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (m *SubscribeRequest) String() string
type SubscribeResponse ¶
type SubscribeResponse struct { }
func (*SubscribeResponse) Descriptor ¶
func (*SubscribeResponse) Descriptor() ([]byte, []int)
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) Reset ¶
func (m *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (m *SubscribeResponse) String() string
Click to show internal directories.
Click to hide internal directories.