Documentation ¶
Overview ¶
Package federation is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package federation is a generated GoMock package.
Package federation is a generated GoMock package.
Package federation is a generated GoMock package.
Package federation is a generated GoMock package.
Index ¶
- Constants
- Variables
- func New(config config.Config) (server.Plugin, error)
- func RegisterFederationServer(s grpc.ServiceRegistrar, srv FederationServer)
- func RegisterMembershipHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMembershipHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MembershipClient) error
- func RegisterMembershipHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMembershipHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MembershipServer) error
- func RegisterMembershipServer(s grpc.ServiceRegistrar, srv MembershipServer)
- type Ack
- func (*Ack) Descriptor() ([]byte, []int)
- func (m *Ack) GetEventId() uint64
- func (*Ack) ProtoMessage()
- func (m *Ack) Reset()
- func (m *Ack) String() string
- func (m *Ack) XXX_DiscardUnknown()
- func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ack) XXX_Merge(src proto.Message)
- func (m *Ack) XXX_Size() int
- func (m *Ack) XXX_Unmarshal(b []byte) error
- type ClientHello
- func (*ClientHello) Descriptor() ([]byte, []int)
- func (m *ClientHello) GetSessionId() string
- func (*ClientHello) ProtoMessage()
- func (m *ClientHello) Reset()
- func (m *ClientHello) String() string
- func (m *ClientHello) XXX_DiscardUnknown()
- func (m *ClientHello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientHello) XXX_Merge(src proto.Message)
- func (m *ClientHello) XXX_Size() int
- func (m *ClientHello) XXX_Unmarshal(b []byte) error
- type Config
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetEvent() isEvent_Event
- func (m *Event) GetId() uint64
- func (m *Event) GetMessage() *Message
- func (m *Event) GetSubscribe() *Subscribe
- func (m *Event) GetUnsubscribe() *Unsubscribe
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) String() string
- func (m *Event) XXX_DiscardUnknown()
- func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Event) XXX_Merge(src proto.Message)
- func (*Event) XXX_OneofWrappers() []interface{}
- func (m *Event) XXX_Size() int
- func (m *Event) XXX_Unmarshal(b []byte) error
- type Event_Message
- type Event_Subscribe
- type Event_Unsubscribe
- type Federation
- func (f *Federation) EventStream(stream Federation_EventStreamServer) (err error)
- func (f *Federation) ForceLeave(ctx context.Context, req *ForceLeaveRequest) (*empty.Empty, error)
- func (f *Federation) Hello(ctx context.Context, req *ClientHello) (resp *ServerHello, err error)
- func (f *Federation) HookWrapper() server.HookWrapper
- func (f *Federation) Join(ctx context.Context, req *JoinRequest) (resp *empty.Empty, err error)
- func (f *Federation) Leave(ctx context.Context, req *empty.Empty) (resp *empty.Empty, err error)
- func (f *Federation) ListMembers(ctx context.Context, req *empty.Empty) (resp *ListMembersResponse, err error)
- func (f *Federation) Load(service server.Server) error
- func (f *Federation) Name() string
- func (f *Federation) OnMsgArrivedWrapper(pre server.OnMsgArrived) server.OnMsgArrived
- func (f *Federation) OnSessionTerminatedWrapper(pre server.OnSessionTerminated) server.OnSessionTerminated
- func (f *Federation) OnSubscribedWrapper(pre server.OnSubscribed) server.OnSubscribed
- func (f *Federation) OnUnsubscribedWrapper(pre server.OnUnsubscribed) server.OnUnsubscribed
- func (f *Federation) OnWillPublishWrapper(pre server.OnWillPublish) server.OnWillPublish
- func (f *Federation) Unload() error
- type FederationClient
- type FederationServer
- type Federation_EventStreamClient
- type Federation_EventStreamServer
- type ForceLeaveRequest
- func (*ForceLeaveRequest) Descriptor() ([]byte, []int)
- func (m *ForceLeaveRequest) GetNodeName() string
- func (*ForceLeaveRequest) ProtoMessage()
- func (m *ForceLeaveRequest) Reset()
- func (m *ForceLeaveRequest) String() string
- func (m *ForceLeaveRequest) XXX_DiscardUnknown()
- func (m *ForceLeaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ForceLeaveRequest) XXX_Merge(src proto.Message)
- func (m *ForceLeaveRequest) XXX_Size() int
- func (m *ForceLeaveRequest) XXX_Unmarshal(b []byte) error
- type JoinRequest
- func (*JoinRequest) Descriptor() ([]byte, []int)
- func (m *JoinRequest) GetHosts() []string
- func (*JoinRequest) ProtoMessage()
- func (m *JoinRequest) Reset()
- func (m *JoinRequest) String() string
- func (m *JoinRequest) XXX_DiscardUnknown()
- func (m *JoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JoinRequest) XXX_Merge(src proto.Message)
- func (m *JoinRequest) XXX_Size() int
- func (m *JoinRequest) XXX_Unmarshal(b []byte) error
- type ListMembersResponse
- func (*ListMembersResponse) Descriptor() ([]byte, []int)
- func (m *ListMembersResponse) GetMembers() []*Member
- func (*ListMembersResponse) ProtoMessage()
- func (m *ListMembersResponse) Reset()
- func (m *ListMembersResponse) String() string
- func (m *ListMembersResponse) XXX_DiscardUnknown()
- func (m *ListMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListMembersResponse) XXX_Merge(src proto.Message)
- func (m *ListMembersResponse) XXX_Size() int
- func (m *ListMembersResponse) XXX_Unmarshal(b []byte) error
- type Member
- func (*Member) Descriptor() ([]byte, []int)
- func (m *Member) GetAddr() string
- func (m *Member) GetName() string
- func (m *Member) GetStatus() Status
- func (m *Member) GetTags() map[string]string
- func (*Member) ProtoMessage()
- func (m *Member) Reset()
- func (m *Member) String() string
- func (m *Member) XXX_DiscardUnknown()
- func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Member) XXX_Merge(src proto.Message)
- func (m *Member) XXX_Size() int
- func (m *Member) XXX_Unmarshal(b []byte) error
- type MembershipClient
- type MembershipServer
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetContentType() string
- func (m *Message) GetCorrelationData() string
- func (m *Message) GetMessageExpiry() uint32
- func (m *Message) GetPayload() []byte
- func (m *Message) GetPayloadFormat() uint32
- func (m *Message) GetQos() uint32
- func (m *Message) GetResponseTopic() string
- func (m *Message) GetRetained() bool
- func (m *Message) GetTopicName() string
- func (m *Message) GetUserProperties() []*UserProperty
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type MockFederationClient
- func (m *MockFederationClient) EXPECT() *MockFederationClientMockRecorder
- func (m *MockFederationClient) EventStream(arg0 context.Context, arg1 ...grpc.CallOption) (Federation_EventStreamClient, error)
- func (m *MockFederationClient) Hello(arg0 context.Context, arg1 *ClientHello, arg2 ...grpc.CallOption) (*ServerHello, error)
- type MockFederationClientMockRecorder
- type MockFederation_EventStreamClient
- func (m *MockFederation_EventStreamClient) CloseSend() error
- func (m *MockFederation_EventStreamClient) Context() context.Context
- func (m *MockFederation_EventStreamClient) EXPECT() *MockFederation_EventStreamClientMockRecorder
- func (m *MockFederation_EventStreamClient) Header() (metadata.MD, error)
- func (m *MockFederation_EventStreamClient) Recv() (*Ack, error)
- func (m *MockFederation_EventStreamClient) RecvMsg(arg0 interface{}) error
- func (m *MockFederation_EventStreamClient) Send(arg0 *Event) error
- func (m *MockFederation_EventStreamClient) SendMsg(arg0 interface{}) error
- func (m *MockFederation_EventStreamClient) Trailer() metadata.MD
- type MockFederation_EventStreamClientMockRecorder
- func (mr *MockFederation_EventStreamClientMockRecorder) CloseSend() *gomock.Call
- func (mr *MockFederation_EventStreamClientMockRecorder) Context() *gomock.Call
- func (mr *MockFederation_EventStreamClientMockRecorder) Header() *gomock.Call
- func (mr *MockFederation_EventStreamClientMockRecorder) Recv() *gomock.Call
- func (mr *MockFederation_EventStreamClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call
- func (mr *MockFederation_EventStreamClientMockRecorder) Send(arg0 interface{}) *gomock.Call
- func (mr *MockFederation_EventStreamClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call
- func (mr *MockFederation_EventStreamClientMockRecorder) Trailer() *gomock.Call
- type MockiSerf
- type MockiSerfMockRecorder
- func (mr *MockiSerfMockRecorder) Join(existing, ignoreOld interface{}) *gomock.Call
- func (mr *MockiSerfMockRecorder) Leave() *gomock.Call
- func (mr *MockiSerfMockRecorder) Members() *gomock.Call
- func (mr *MockiSerfMockRecorder) RemoveFailedNode(node interface{}) *gomock.Call
- func (mr *MockiSerfMockRecorder) Shutdown() *gomock.Call
- type MockisEvent_Event
- type MockisEvent_EventMockRecorder
- type Mockqueue
- type MockqueueMockRecorder
- type ServerHello
- func (*ServerHello) Descriptor() ([]byte, []int)
- func (m *ServerHello) GetCleanStart() bool
- func (m *ServerHello) GetNextEventId() uint64
- func (*ServerHello) ProtoMessage()
- func (m *ServerHello) Reset()
- func (m *ServerHello) String() string
- func (m *ServerHello) XXX_DiscardUnknown()
- func (m *ServerHello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ServerHello) XXX_Merge(src proto.Message)
- func (m *ServerHello) XXX_Size() int
- func (m *ServerHello) XXX_Unmarshal(b []byte) error
- type Status
- type Subscribe
- func (*Subscribe) Descriptor() ([]byte, []int)
- func (m *Subscribe) GetShareName() string
- func (m *Subscribe) GetTopicFilter() string
- func (*Subscribe) ProtoMessage()
- func (m *Subscribe) Reset()
- func (m *Subscribe) String() string
- func (m *Subscribe) XXX_DiscardUnknown()
- func (m *Subscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Subscribe) XXX_Merge(src proto.Message)
- func (m *Subscribe) XXX_Size() int
- func (m *Subscribe) XXX_Unmarshal(b []byte) error
- type UnimplementedFederationServer
- type UnimplementedMembershipServer
- func (UnimplementedMembershipServer) ForceLeave(context.Context, *ForceLeaveRequest) (*empty.Empty, error)
- func (UnimplementedMembershipServer) Join(context.Context, *JoinRequest) (*empty.Empty, error)
- func (UnimplementedMembershipServer) Leave(context.Context, *empty.Empty) (*empty.Empty, error)
- func (UnimplementedMembershipServer) ListMembers(context.Context, *empty.Empty) (*ListMembersResponse, error)
- type UnsafeFederationServer
- type UnsafeMembershipServer
- type Unsubscribe
- func (*Unsubscribe) Descriptor() ([]byte, []int)
- func (m *Unsubscribe) GetTopicName() string
- func (*Unsubscribe) ProtoMessage()
- func (m *Unsubscribe) Reset()
- func (m *Unsubscribe) String() string
- func (m *Unsubscribe) XXX_DiscardUnknown()
- func (m *Unsubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Unsubscribe) XXX_Merge(src proto.Message)
- func (m *Unsubscribe) XXX_Size() int
- func (m *Unsubscribe) XXX_Unmarshal(b []byte) error
- type UserProperty
- func (*UserProperty) Descriptor() ([]byte, []int)
- func (m *UserProperty) GetK() []byte
- func (m *UserProperty) GetV() []byte
- func (*UserProperty) ProtoMessage()
- func (m *UserProperty) Reset()
- func (m *UserProperty) String() string
- func (m *UserProperty) XXX_DiscardUnknown()
- func (m *UserProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserProperty) XXX_Merge(src proto.Message)
- func (m *UserProperty) XXX_Size() int
- func (m *UserProperty) XXX_Unmarshal(b []byte) error
Constants ¶
const ( DefaultFedPort = "8901" DefaultGossipPort = "8902" DefaultRetryInterval = 5 * time.Second DefaultRetryTimeout = 1 * time.Minute )
Default config.
const Name = "federation"
Variables ¶
var DefaultConfig = Config{}
DefaultConfig is the default configuration.
var Federation_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gmqtt.federation.api.Federation", HandlerType: (*FederationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _Federation_Hello_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "EventStream", Handler: _Federation_EventStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "federation.proto", }
Federation_ServiceDesc is the grpc.ServiceDesc for Federation service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Membership_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gmqtt.federation.api.Membership", HandlerType: (*MembershipServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Join", Handler: _Membership_Join_Handler, }, { MethodName: "Leave", Handler: _Membership_Leave_Handler, }, { MethodName: "ForceLeave", Handler: _Membership_ForceLeave_Handler, }, { MethodName: "ListMembers", Handler: _Membership_ListMembers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "federation.proto", }
Membership_ServiceDesc is the grpc.ServiceDesc for Membership service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Status_name = map[int32]string{
0: "STATUS_UNSPECIFIED",
1: "STATUS_ALIVE",
2: "STATUS_LEAVING",
3: "STATUS_LEFT",
4: "STATUS_FAILED",
}
var Status_value = map[string]int32{
"STATUS_UNSPECIFIED": 0,
"STATUS_ALIVE": 1,
"STATUS_LEAVING": 2,
"STATUS_LEFT": 3,
"STATUS_FAILED": 4,
}
Functions ¶
func RegisterFederationServer ¶
func RegisterFederationServer(s grpc.ServiceRegistrar, srv FederationServer)
func RegisterMembershipHandler ¶
func RegisterMembershipHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMembershipHandler registers the http handlers for service Membership to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMembershipHandlerClient ¶
func RegisterMembershipHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MembershipClient) error
RegisterMembershipHandlerClient registers the http handlers for service Membership to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MembershipClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MembershipClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MembershipClient" to call the correct interceptors.
func RegisterMembershipHandlerFromEndpoint ¶
func RegisterMembershipHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMembershipHandlerFromEndpoint is same as RegisterMembershipHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMembershipHandlerServer ¶
func RegisterMembershipHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MembershipServer) error
RegisterMembershipHandlerServer registers the http handlers for service Membership to "mux". UnaryRPC :call MembershipServer 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 RegisterMembershipHandlerFromEndpoint instead.
func RegisterMembershipServer ¶
func RegisterMembershipServer(s grpc.ServiceRegistrar, srv MembershipServer)
Types ¶
type Ack ¶
type Ack struct { EventId uint64 `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Ack) Descriptor ¶
func (*Ack) GetEventId ¶
func (*Ack) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *Ack) XXX_DiscardUnknown()
func (*Ack) XXX_Marshal ¶ added in v0.5.0
func (*Ack) XXX_Unmarshal ¶ added in v0.5.0
type ClientHello ¶
type ClientHello struct { SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ClientHello is the request message in handshake process.
func (*ClientHello) Descriptor ¶
func (*ClientHello) Descriptor() ([]byte, []int)
func (*ClientHello) GetSessionId ¶
func (m *ClientHello) GetSessionId() string
func (*ClientHello) ProtoMessage ¶
func (*ClientHello) ProtoMessage()
func (*ClientHello) Reset ¶
func (m *ClientHello) Reset()
func (*ClientHello) String ¶
func (m *ClientHello) String() string
func (*ClientHello) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *ClientHello) XXX_DiscardUnknown()
func (*ClientHello) XXX_Marshal ¶ added in v0.5.0
func (m *ClientHello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientHello) XXX_Merge ¶ added in v0.5.0
func (m *ClientHello) XXX_Merge(src proto.Message)
func (*ClientHello) XXX_Size ¶ added in v0.5.0
func (m *ClientHello) XXX_Size() int
func (*ClientHello) XXX_Unmarshal ¶ added in v0.5.0
func (m *ClientHello) XXX_Unmarshal(b []byte) error
type Config ¶
type Config struct { // NodeName is the unique identifier for the node in the federation. Defaults to hostname. NodeName string `yaml:"node_name"` // FedAddr is the gRPC server listening address for the federation internal communication. // Defaults to :8901. // If the port is missing, the default federation port (8901) will be used. FedAddr string `yaml:"fed_addr"` // AdvertiseFedAddr is used to change the federation gRPC server address that we advertise to other nodes in the cluster. // Defaults to "FedAddr" or the private IP address of the node if the IP in "FedAddr" is 0.0.0.0. // However, in some cases, there may be a routable address that cannot be bound. // If the port is missing, the default federation port (8901) will be used. AdvertiseFedAddr string `yaml:"advertise_fed_addr"` // GossipAddr is the address that the gossip will listen on, It is used for both UDP and TCP gossip. Defaults to :8902 GossipAddr string `yaml:"gossip_addr"` // AdvertiseGossipAddr is used to change the gossip server address that we advertise to other nodes in the cluster. // Defaults to "GossipAddr" or the private IP address of the node if the IP in "GossipAddr" is 0.0.0.0. // If the port is missing, the default gossip port (8902) will be used. AdvertiseGossipAddr string `yaml:"advertise_gossip_addr"` // RetryJoin is the address of other nodes to join upon starting up. // If port is missing, the default gossip port (8902) will be used. RetryJoin []string `yaml:"retry_join"` // RetryInterval is the time to wait between join attempts. Defaults to 5s. RetryInterval time.Duration `yaml:"retry_interval"` // RetryTimeout is the timeout to wait before joining all nodes in RetryJoin successfully. // If timeout expires, the server will exit with error. Defaults to 1m. RetryTimeout time.Duration `yaml:"retry_timeout"` // SnapshotPath will be pass to "SnapshotPath" in serf configuration. // When Serf is started with a snapshot, // it will attempt to join all the previously known nodes until one // succeeds and will also avoid replaying old user events. SnapshotPath string `yaml:"snapshot_path"` // RejoinAfterLeave will be pass to "RejoinAfterLeave" in serf configuration. // It controls our interaction with the snapshot file. // When set to false (default), a leave causes a Serf to not rejoin // the cluster until an explicit join is received. If this is set to // true, we ignore the leave, and rejoin the cluster on start. RejoinAfterLeave bool `yaml:"rejoin_after_leave"` }
Config is the configuration for the federation plugin.
func (*Config) UnmarshalYAML ¶
type Event ¶
type Event struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are valid to be assigned to Event: // *Event_Subscribe // *Event_Message // *Event_Unsubscribe Event isEvent_Event `protobuf_oneof:"Event"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Event) Descriptor ¶
func (*Event) GetMessage ¶
func (*Event) GetSubscribe ¶
func (*Event) GetUnsubscribe ¶
func (m *Event) GetUnsubscribe() *Unsubscribe
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶ added in v0.5.0
func (*Event) XXX_OneofWrappers ¶ added in v0.5.0
func (*Event) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Event) XXX_Unmarshal ¶ added in v0.5.0
type Event_Message ¶
type Event_Message struct {
Message *Message `protobuf:"bytes,3,opt,name=message,proto3,oneof"`
}
type Event_Subscribe ¶
type Event_Subscribe struct {
Subscribe *Subscribe `protobuf:"bytes,2,opt,name=Subscribe,proto3,oneof"`
}
type Event_Unsubscribe ¶
type Event_Unsubscribe struct {
Unsubscribe *Unsubscribe `protobuf:"bytes,4,opt,name=unsubscribe,proto3,oneof"`
}
type Federation ¶
type Federation struct {
// contains filtered or unexported fields
}
func (*Federation) EventStream ¶
func (f *Federation) EventStream(stream Federation_EventStreamServer) (err error)
func (*Federation) ForceLeave ¶
func (f *Federation) ForceLeave(ctx context.Context, req *ForceLeaveRequest) (*empty.Empty, error)
ForceLeave forces a member of a Serf cluster to enter the "left" state. Note that if the member is still actually alive, it will eventually rejoin the cluster. The true purpose of this method is to force remove "failed" nodes See https://www.serf.io/docs/commands/force-leave.html for details.
func (*Federation) Hello ¶
func (f *Federation) Hello(ctx context.Context, req *ClientHello) (resp *ServerHello, err error)
Hello is the handler for the handshake process before opening the event stream.
func (*Federation) HookWrapper ¶
func (f *Federation) HookWrapper() server.HookWrapper
func (*Federation) Join ¶
func (f *Federation) Join(ctx context.Context, req *JoinRequest) (resp *empty.Empty, err error)
Join tells the local node to join the an existing cluster. See https://www.serf.io/docs/commands/join.html for details.
func (*Federation) Leave ¶
Leave triggers a graceful leave for the local node. This is used to ensure other nodes see the node as "left" instead of "failed". Note that a leaved node cannot re-join the cluster unless you restart the leaved node.
func (*Federation) ListMembers ¶
func (f *Federation) ListMembers(ctx context.Context, req *empty.Empty) (resp *ListMembersResponse, err error)
ListMembers lists all known members in the Serf cluster.
func (*Federation) Name ¶
func (f *Federation) Name() string
func (*Federation) OnMsgArrivedWrapper ¶
func (f *Federation) OnMsgArrivedWrapper(pre server.OnMsgArrived) server.OnMsgArrived
func (*Federation) OnSessionTerminatedWrapper ¶
func (f *Federation) OnSessionTerminatedWrapper(pre server.OnSessionTerminated) server.OnSessionTerminated
func (*Federation) OnSubscribedWrapper ¶
func (f *Federation) OnSubscribedWrapper(pre server.OnSubscribed) server.OnSubscribed
func (*Federation) OnUnsubscribedWrapper ¶
func (f *Federation) OnUnsubscribedWrapper(pre server.OnUnsubscribed) server.OnUnsubscribed
func (*Federation) OnWillPublishWrapper ¶
func (f *Federation) OnWillPublishWrapper(pre server.OnWillPublish) server.OnWillPublish
func (*Federation) Unload ¶
func (f *Federation) Unload() error
type FederationClient ¶
type FederationClient interface { Hello(ctx context.Context, in *ClientHello, opts ...grpc.CallOption) (*ServerHello, error) EventStream(ctx context.Context, opts ...grpc.CallOption) (Federation_EventStreamClient, error) }
FederationClient is the client API for Federation 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 NewFederationClient ¶
func NewFederationClient(cc grpc.ClientConnInterface) FederationClient
type FederationServer ¶
type FederationServer interface { Hello(context.Context, *ClientHello) (*ServerHello, error) EventStream(Federation_EventStreamServer) error // contains filtered or unexported methods }
FederationServer is the server API for Federation service. All implementations must embed UnimplementedFederationServer for forward compatibility
type ForceLeaveRequest ¶
type ForceLeaveRequest struct { NodeName string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ForceLeaveRequest) Descriptor ¶
func (*ForceLeaveRequest) Descriptor() ([]byte, []int)
func (*ForceLeaveRequest) GetNodeName ¶
func (m *ForceLeaveRequest) GetNodeName() string
func (*ForceLeaveRequest) ProtoMessage ¶
func (*ForceLeaveRequest) ProtoMessage()
func (*ForceLeaveRequest) Reset ¶
func (m *ForceLeaveRequest) Reset()
func (*ForceLeaveRequest) String ¶
func (m *ForceLeaveRequest) String() string
func (*ForceLeaveRequest) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *ForceLeaveRequest) XXX_DiscardUnknown()
func (*ForceLeaveRequest) XXX_Marshal ¶ added in v0.5.0
func (m *ForceLeaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ForceLeaveRequest) XXX_Merge ¶ added in v0.5.0
func (m *ForceLeaveRequest) XXX_Merge(src proto.Message)
func (*ForceLeaveRequest) XXX_Size ¶ added in v0.5.0
func (m *ForceLeaveRequest) XXX_Size() int
func (*ForceLeaveRequest) XXX_Unmarshal ¶ added in v0.5.0
func (m *ForceLeaveRequest) XXX_Unmarshal(b []byte) error
type JoinRequest ¶
type JoinRequest struct { Hosts []string `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*JoinRequest) Descriptor ¶
func (*JoinRequest) Descriptor() ([]byte, []int)
func (*JoinRequest) GetHosts ¶
func (m *JoinRequest) GetHosts() []string
func (*JoinRequest) ProtoMessage ¶
func (*JoinRequest) ProtoMessage()
func (*JoinRequest) Reset ¶
func (m *JoinRequest) Reset()
func (*JoinRequest) String ¶
func (m *JoinRequest) String() string
func (*JoinRequest) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *JoinRequest) XXX_DiscardUnknown()
func (*JoinRequest) XXX_Marshal ¶ added in v0.5.0
func (m *JoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*JoinRequest) XXX_Merge ¶ added in v0.5.0
func (m *JoinRequest) XXX_Merge(src proto.Message)
func (*JoinRequest) XXX_Size ¶ added in v0.5.0
func (m *JoinRequest) XXX_Size() int
func (*JoinRequest) XXX_Unmarshal ¶ added in v0.5.0
func (m *JoinRequest) XXX_Unmarshal(b []byte) error
type ListMembersResponse ¶
type ListMembersResponse struct { Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListMembersResponse) Descriptor ¶
func (*ListMembersResponse) Descriptor() ([]byte, []int)
func (*ListMembersResponse) GetMembers ¶
func (m *ListMembersResponse) GetMembers() []*Member
func (*ListMembersResponse) ProtoMessage ¶
func (*ListMembersResponse) ProtoMessage()
func (*ListMembersResponse) Reset ¶
func (m *ListMembersResponse) Reset()
func (*ListMembersResponse) String ¶
func (m *ListMembersResponse) String() string
func (*ListMembersResponse) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *ListMembersResponse) XXX_DiscardUnknown()
func (*ListMembersResponse) XXX_Marshal ¶ added in v0.5.0
func (m *ListMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListMembersResponse) XXX_Merge ¶ added in v0.5.0
func (m *ListMembersResponse) XXX_Merge(src proto.Message)
func (*ListMembersResponse) XXX_Size ¶ added in v0.5.0
func (m *ListMembersResponse) XXX_Size() int
func (*ListMembersResponse) XXX_Unmarshal ¶ added in v0.5.0
func (m *ListMembersResponse) XXX_Unmarshal(b []byte) error
type Member ¶
type Member struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Tags map[string]string `` /* 149-byte string literal not displayed */ Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=gmqtt.federation.api.Status" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Member) Descriptor ¶
func (*Member) ProtoMessage ¶
func (*Member) ProtoMessage()
func (*Member) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *Member) XXX_DiscardUnknown()
func (*Member) XXX_Marshal ¶ added in v0.5.0
func (*Member) XXX_Unmarshal ¶ added in v0.5.0
type MembershipClient ¶
type MembershipClient interface { // Join tells the local node to join the an existing cluster. // See https://www.serf.io/docs/commands/join.html for details. Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*empty.Empty, error) // Leave triggers a graceful leave for the local node. // This is used to ensure other nodes see the node as "left" instead of "failed". // Note that a leaved node cannot re-join the cluster unless you restart the leaved node. Leave(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) // ForceLeave force forces a member of a Serf cluster to enter the "left" state. // Note that if the member is still actually alive, it will eventually rejoin the cluster. // The true purpose of this method is to force remove "failed" nodes // See https://www.serf.io/docs/commands/force-leave.html for details. ForceLeave(ctx context.Context, in *ForceLeaveRequest, opts ...grpc.CallOption) (*empty.Empty, error) // ListMembers lists all known members in the Serf cluster. ListMembers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListMembersResponse, error) }
MembershipClient is the client API for Membership 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 NewMembershipClient ¶
func NewMembershipClient(cc grpc.ClientConnInterface) MembershipClient
type MembershipServer ¶
type MembershipServer interface { // Join tells the local node to join the an existing cluster. // See https://www.serf.io/docs/commands/join.html for details. Join(context.Context, *JoinRequest) (*empty.Empty, error) // Leave triggers a graceful leave for the local node. // This is used to ensure other nodes see the node as "left" instead of "failed". // Note that a leaved node cannot re-join the cluster unless you restart the leaved node. Leave(context.Context, *empty.Empty) (*empty.Empty, error) // ForceLeave force forces a member of a Serf cluster to enter the "left" state. // Note that if the member is still actually alive, it will eventually rejoin the cluster. // The true purpose of this method is to force remove "failed" nodes // See https://www.serf.io/docs/commands/force-leave.html for details. ForceLeave(context.Context, *ForceLeaveRequest) (*empty.Empty, error) // ListMembers lists all known members in the Serf cluster. ListMembers(context.Context, *empty.Empty) (*ListMembersResponse, error) // contains filtered or unexported methods }
MembershipServer is the server API for Membership service. All implementations must embed UnimplementedMembershipServer for forward compatibility
type Message ¶
type Message struct { TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` Qos uint32 `protobuf:"varint,3,opt,name=qos,proto3" json:"qos,omitempty"` Retained bool `protobuf:"varint,4,opt,name=retained,proto3" json:"retained,omitempty"` // the following fields are using in v5 client. ContentType string `protobuf:"bytes,5,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` CorrelationData string `protobuf:"bytes,6,opt,name=correlation_data,json=correlationData,proto3" json:"correlation_data,omitempty"` MessageExpiry uint32 `protobuf:"varint,7,opt,name=message_expiry,json=messageExpiry,proto3" json:"message_expiry,omitempty"` PayloadFormat uint32 `protobuf:"varint,8,opt,name=payload_format,json=payloadFormat,proto3" json:"payload_format,omitempty"` ResponseTopic string `protobuf:"bytes,9,opt,name=response_topic,json=responseTopic,proto3" json:"response_topic,omitempty"` UserProperties []*UserProperty `protobuf:"bytes,10,rep,name=user_properties,json=userProperties,proto3" json:"user_properties,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Message) Descriptor ¶
func (*Message) GetContentType ¶
func (*Message) GetCorrelationData ¶
func (*Message) GetMessageExpiry ¶
func (*Message) GetPayload ¶
func (*Message) GetPayloadFormat ¶
func (*Message) GetResponseTopic ¶
func (*Message) GetRetained ¶
func (*Message) GetTopicName ¶
func (*Message) GetUserProperties ¶
func (m *Message) GetUserProperties() []*UserProperty
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶ added in v0.5.0
func (*Message) XXX_Unmarshal ¶ added in v0.5.0
type MockFederationClient ¶
type MockFederationClient struct {
// contains filtered or unexported fields
}
MockFederationClient is a mock of FederationClient interface
func NewMockFederationClient ¶
func NewMockFederationClient(ctrl *gomock.Controller) *MockFederationClient
NewMockFederationClient creates a new mock instance
func (*MockFederationClient) EXPECT ¶
func (m *MockFederationClient) EXPECT() *MockFederationClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockFederationClient) EventStream ¶
func (m *MockFederationClient) EventStream(arg0 context.Context, arg1 ...grpc.CallOption) (Federation_EventStreamClient, error)
EventStream mocks base method
func (*MockFederationClient) Hello ¶
func (m *MockFederationClient) Hello(arg0 context.Context, arg1 *ClientHello, arg2 ...grpc.CallOption) (*ServerHello, error)
Hello mocks base method
type MockFederationClientMockRecorder ¶
type MockFederationClientMockRecorder struct {
// contains filtered or unexported fields
}
MockFederationClientMockRecorder is the mock recorder for MockFederationClient
func (*MockFederationClientMockRecorder) EventStream ¶
func (mr *MockFederationClientMockRecorder) EventStream(arg0 interface{}, arg1 ...interface{}) *gomock.Call
EventStream indicates an expected call of EventStream
func (*MockFederationClientMockRecorder) Hello ¶
func (mr *MockFederationClientMockRecorder) Hello(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Hello indicates an expected call of Hello
type MockFederation_EventStreamClient ¶
type MockFederation_EventStreamClient struct {
// contains filtered or unexported fields
}
MockFederation_EventStreamClient is a mock of Federation_EventStreamClient interface
func NewMockFederation_EventStreamClient ¶
func NewMockFederation_EventStreamClient(ctrl *gomock.Controller) *MockFederation_EventStreamClient
NewMockFederation_EventStreamClient creates a new mock instance
func (*MockFederation_EventStreamClient) CloseSend ¶
func (m *MockFederation_EventStreamClient) CloseSend() error
CloseSend mocks base method
func (*MockFederation_EventStreamClient) Context ¶
func (m *MockFederation_EventStreamClient) Context() context.Context
Context mocks base method
func (*MockFederation_EventStreamClient) EXPECT ¶
func (m *MockFederation_EventStreamClient) EXPECT() *MockFederation_EventStreamClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockFederation_EventStreamClient) Header ¶
func (m *MockFederation_EventStreamClient) Header() (metadata.MD, error)
Header mocks base method
func (*MockFederation_EventStreamClient) Recv ¶
func (m *MockFederation_EventStreamClient) Recv() (*Ack, error)
Recv mocks base method
func (*MockFederation_EventStreamClient) RecvMsg ¶
func (m *MockFederation_EventStreamClient) RecvMsg(arg0 interface{}) error
RecvMsg mocks base method
func (*MockFederation_EventStreamClient) Send ¶
func (m *MockFederation_EventStreamClient) Send(arg0 *Event) error
Send mocks base method
func (*MockFederation_EventStreamClient) SendMsg ¶
func (m *MockFederation_EventStreamClient) SendMsg(arg0 interface{}) error
SendMsg mocks base method
func (*MockFederation_EventStreamClient) Trailer ¶
func (m *MockFederation_EventStreamClient) Trailer() metadata.MD
Trailer mocks base method
type MockFederation_EventStreamClientMockRecorder ¶
type MockFederation_EventStreamClientMockRecorder struct {
// contains filtered or unexported fields
}
MockFederation_EventStreamClientMockRecorder is the mock recorder for MockFederation_EventStreamClient
func (*MockFederation_EventStreamClientMockRecorder) CloseSend ¶
func (mr *MockFederation_EventStreamClientMockRecorder) CloseSend() *gomock.Call
CloseSend indicates an expected call of CloseSend
func (*MockFederation_EventStreamClientMockRecorder) Context ¶
func (mr *MockFederation_EventStreamClientMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context
func (*MockFederation_EventStreamClientMockRecorder) Header ¶
func (mr *MockFederation_EventStreamClientMockRecorder) Header() *gomock.Call
Header indicates an expected call of Header
func (*MockFederation_EventStreamClientMockRecorder) Recv ¶
func (mr *MockFederation_EventStreamClientMockRecorder) Recv() *gomock.Call
Recv indicates an expected call of Recv
func (*MockFederation_EventStreamClientMockRecorder) RecvMsg ¶
func (mr *MockFederation_EventStreamClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call
RecvMsg indicates an expected call of RecvMsg
func (*MockFederation_EventStreamClientMockRecorder) Send ¶
func (mr *MockFederation_EventStreamClientMockRecorder) Send(arg0 interface{}) *gomock.Call
Send indicates an expected call of Send
func (*MockFederation_EventStreamClientMockRecorder) SendMsg ¶
func (mr *MockFederation_EventStreamClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call
SendMsg indicates an expected call of SendMsg
func (*MockFederation_EventStreamClientMockRecorder) Trailer ¶
func (mr *MockFederation_EventStreamClientMockRecorder) Trailer() *gomock.Call
Trailer indicates an expected call of Trailer
type MockiSerf ¶
type MockiSerf struct {
// contains filtered or unexported fields
}
MockiSerf is a mock of iSerf interface
func NewMockiSerf ¶
func NewMockiSerf(ctrl *gomock.Controller) *MockiSerf
NewMockiSerf creates a new mock instance
func (*MockiSerf) EXPECT ¶
func (m *MockiSerf) EXPECT() *MockiSerfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockiSerf) RemoveFailedNode ¶
RemoveFailedNode mocks base method
type MockiSerfMockRecorder ¶
type MockiSerfMockRecorder struct {
// contains filtered or unexported fields
}
MockiSerfMockRecorder is the mock recorder for MockiSerf
func (*MockiSerfMockRecorder) Join ¶
func (mr *MockiSerfMockRecorder) Join(existing, ignoreOld interface{}) *gomock.Call
Join indicates an expected call of Join
func (*MockiSerfMockRecorder) Leave ¶
func (mr *MockiSerfMockRecorder) Leave() *gomock.Call
Leave indicates an expected call of Leave
func (*MockiSerfMockRecorder) Members ¶
func (mr *MockiSerfMockRecorder) Members() *gomock.Call
Members indicates an expected call of Members
func (*MockiSerfMockRecorder) RemoveFailedNode ¶
func (mr *MockiSerfMockRecorder) RemoveFailedNode(node interface{}) *gomock.Call
RemoveFailedNode indicates an expected call of RemoveFailedNode
func (*MockiSerfMockRecorder) Shutdown ¶
func (mr *MockiSerfMockRecorder) Shutdown() *gomock.Call
Shutdown indicates an expected call of Shutdown
type MockisEvent_Event ¶
type MockisEvent_Event struct {
// contains filtered or unexported fields
}
MockisEvent_Event is a mock of isEvent_Event interface
func NewMockisEvent_Event ¶
func NewMockisEvent_Event(ctrl *gomock.Controller) *MockisEvent_Event
NewMockisEvent_Event creates a new mock instance
func (*MockisEvent_Event) EXPECT ¶
func (m *MockisEvent_Event) EXPECT() *MockisEvent_EventMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockisEvent_EventMockRecorder ¶
type MockisEvent_EventMockRecorder struct {
// contains filtered or unexported fields
}
MockisEvent_EventMockRecorder is the mock recorder for MockisEvent_Event
type Mockqueue ¶
type Mockqueue struct {
// contains filtered or unexported fields
}
Mockqueue is a mock of queue interface
func NewMockqueue ¶
func NewMockqueue(ctrl *gomock.Controller) *Mockqueue
NewMockqueue creates a new mock instance
func (*Mockqueue) EXPECT ¶
func (m *Mockqueue) EXPECT() *MockqueueMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockqueueMockRecorder ¶
type MockqueueMockRecorder struct {
// contains filtered or unexported fields
}
MockqueueMockRecorder is the mock recorder for Mockqueue
type ServerHello ¶
type ServerHello struct { CleanStart bool `protobuf:"varint,1,opt,name=clean_start,json=cleanStart,proto3" json:"clean_start,omitempty"` NextEventId uint64 `protobuf:"varint,2,opt,name=next_event_id,json=nextEventId,proto3" json:"next_event_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ServerHello is the response message in handshake process.
func (*ServerHello) Descriptor ¶
func (*ServerHello) Descriptor() ([]byte, []int)
func (*ServerHello) GetCleanStart ¶
func (m *ServerHello) GetCleanStart() bool
func (*ServerHello) GetNextEventId ¶
func (m *ServerHello) GetNextEventId() uint64
func (*ServerHello) ProtoMessage ¶
func (*ServerHello) ProtoMessage()
func (*ServerHello) Reset ¶
func (m *ServerHello) Reset()
func (*ServerHello) String ¶
func (m *ServerHello) String() string
func (*ServerHello) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *ServerHello) XXX_DiscardUnknown()
func (*ServerHello) XXX_Marshal ¶ added in v0.5.0
func (m *ServerHello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ServerHello) XXX_Merge ¶ added in v0.5.0
func (m *ServerHello) XXX_Merge(src proto.Message)
func (*ServerHello) XXX_Size ¶ added in v0.5.0
func (m *ServerHello) XXX_Size() int
func (*ServerHello) XXX_Unmarshal ¶ added in v0.5.0
func (m *ServerHello) XXX_Unmarshal(b []byte) error
type Subscribe ¶
type Subscribe struct { TopicFilter string `protobuf:"bytes,2,opt,name=topic_filter,json=topicFilter,proto3" json:"topic_filter,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Subscribe represents the subscription for a node, it is used to route message among nodes, so only shared_name and topic_filter is required.
func (*Subscribe) Descriptor ¶
func (*Subscribe) GetShareName ¶
func (*Subscribe) GetTopicFilter ¶
func (*Subscribe) ProtoMessage ¶
func (*Subscribe) ProtoMessage()
func (*Subscribe) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *Subscribe) XXX_DiscardUnknown()
func (*Subscribe) XXX_Marshal ¶ added in v0.5.0
func (*Subscribe) XXX_Unmarshal ¶ added in v0.5.0
type UnimplementedFederationServer ¶
type UnimplementedFederationServer struct { }
UnimplementedFederationServer must be embedded to have forward compatible implementations.
func (UnimplementedFederationServer) EventStream ¶
func (UnimplementedFederationServer) EventStream(Federation_EventStreamServer) error
func (UnimplementedFederationServer) Hello ¶
func (UnimplementedFederationServer) Hello(context.Context, *ClientHello) (*ServerHello, error)
type UnimplementedMembershipServer ¶
type UnimplementedMembershipServer struct { }
UnimplementedMembershipServer must be embedded to have forward compatible implementations.
func (UnimplementedMembershipServer) ForceLeave ¶
func (UnimplementedMembershipServer) ForceLeave(context.Context, *ForceLeaveRequest) (*empty.Empty, error)
func (UnimplementedMembershipServer) Join ¶
func (UnimplementedMembershipServer) Join(context.Context, *JoinRequest) (*empty.Empty, error)
func (UnimplementedMembershipServer) ListMembers ¶
func (UnimplementedMembershipServer) ListMembers(context.Context, *empty.Empty) (*ListMembersResponse, error)
type UnsafeFederationServer ¶
type UnsafeFederationServer interface {
// contains filtered or unexported methods
}
UnsafeFederationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FederationServer will result in compilation errors.
type UnsafeMembershipServer ¶
type UnsafeMembershipServer interface {
// contains filtered or unexported methods
}
UnsafeMembershipServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MembershipServer will result in compilation errors.
type Unsubscribe ¶
type Unsubscribe struct { TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Unsubscribe) Descriptor ¶
func (*Unsubscribe) Descriptor() ([]byte, []int)
func (*Unsubscribe) GetTopicName ¶
func (m *Unsubscribe) GetTopicName() string
func (*Unsubscribe) ProtoMessage ¶
func (*Unsubscribe) ProtoMessage()
func (*Unsubscribe) Reset ¶
func (m *Unsubscribe) Reset()
func (*Unsubscribe) String ¶
func (m *Unsubscribe) String() string
func (*Unsubscribe) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *Unsubscribe) XXX_DiscardUnknown()
func (*Unsubscribe) XXX_Marshal ¶ added in v0.5.0
func (m *Unsubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Unsubscribe) XXX_Merge ¶ added in v0.5.0
func (m *Unsubscribe) XXX_Merge(src proto.Message)
func (*Unsubscribe) XXX_Size ¶ added in v0.5.0
func (m *Unsubscribe) XXX_Size() int
func (*Unsubscribe) XXX_Unmarshal ¶ added in v0.5.0
func (m *Unsubscribe) XXX_Unmarshal(b []byte) error
type UserProperty ¶
type UserProperty struct { K []byte `protobuf:"bytes,1,opt,name=K,proto3" json:"K,omitempty"` V []byte `protobuf:"bytes,2,opt,name=V,proto3" json:"V,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserProperty) Descriptor ¶
func (*UserProperty) Descriptor() ([]byte, []int)
func (*UserProperty) GetK ¶
func (m *UserProperty) GetK() []byte
func (*UserProperty) GetV ¶
func (m *UserProperty) GetV() []byte
func (*UserProperty) ProtoMessage ¶
func (*UserProperty) ProtoMessage()
func (*UserProperty) Reset ¶
func (m *UserProperty) Reset()
func (*UserProperty) String ¶
func (m *UserProperty) String() string
func (*UserProperty) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *UserProperty) XXX_DiscardUnknown()
func (*UserProperty) XXX_Marshal ¶ added in v0.5.0
func (m *UserProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserProperty) XXX_Merge ¶ added in v0.5.0
func (m *UserProperty) XXX_Merge(src proto.Message)
func (*UserProperty) XXX_Size ¶ added in v0.5.0
func (m *UserProperty) XXX_Size() int
func (*UserProperty) XXX_Unmarshal ¶ added in v0.5.0
func (m *UserProperty) XXX_Unmarshal(b []byte) error