Documentation
¶
Index ¶
- func RegisterSwimServer(s *grpc.Server, srv SwimServer)
- type JoinMessageInput
- func (*JoinMessageInput) Descriptor() ([]byte, []int)
- func (m *JoinMessageInput) GetNode() *Node
- func (m *JoinMessageInput) GetTimestamp() int64
- func (*JoinMessageInput) ProtoMessage()
- func (m *JoinMessageInput) Reset()
- func (m *JoinMessageInput) String() string
- func (m *JoinMessageInput) XXX_DiscardUnknown()
- func (m *JoinMessageInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JoinMessageInput) XXX_Merge(src proto.Message)
- func (m *JoinMessageInput) XXX_Size() int
- func (m *JoinMessageInput) XXX_Unmarshal(b []byte) error
- type JoinMessageOutput
- func (*JoinMessageOutput) Descriptor() ([]byte, []int)
- func (m *JoinMessageOutput) GetNodes() []*Node
- func (m *JoinMessageOutput) GetSuccess() bool
- func (m *JoinMessageOutput) GetTimestamp() int64
- func (*JoinMessageOutput) ProtoMessage()
- func (m *JoinMessageOutput) Reset()
- func (m *JoinMessageOutput) String() string
- func (m *JoinMessageOutput) XXX_DiscardUnknown()
- func (m *JoinMessageOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JoinMessageOutput) XXX_Merge(src proto.Message)
- func (m *JoinMessageOutput) XXX_Size() int
- func (m *JoinMessageOutput) XXX_Unmarshal(b []byte) error
- type LeaveMessageInput
- func (*LeaveMessageInput) Descriptor() ([]byte, []int)
- func (m *LeaveMessageInput) GetNode() *Node
- func (m *LeaveMessageInput) GetTimestamp() int64
- func (*LeaveMessageInput) ProtoMessage()
- func (m *LeaveMessageInput) Reset()
- func (m *LeaveMessageInput) String() string
- func (m *LeaveMessageInput) XXX_DiscardUnknown()
- func (m *LeaveMessageInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LeaveMessageInput) XXX_Merge(src proto.Message)
- func (m *LeaveMessageInput) XXX_Size() int
- func (m *LeaveMessageInput) XXX_Unmarshal(b []byte) error
- type LeaveMessageOutput
- func (*LeaveMessageOutput) Descriptor() ([]byte, []int)
- func (m *LeaveMessageOutput) GetSuccess() bool
- func (m *LeaveMessageOutput) GetTimestamp() int64
- func (*LeaveMessageOutput) ProtoMessage()
- func (m *LeaveMessageOutput) Reset()
- func (m *LeaveMessageOutput) String() string
- func (m *LeaveMessageOutput) XXX_DiscardUnknown()
- func (m *LeaveMessageOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LeaveMessageOutput) XXX_Merge(src proto.Message)
- func (m *LeaveMessageOutput) XXX_Size() int
- func (m *LeaveMessageOutput) XXX_Unmarshal(b []byte) error
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetAddress() string
- func (m *Node) GetLastSeen() int64
- func (m *Node) GetPort() uint32
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) String() string
- func (m *Node) XXX_DiscardUnknown()
- func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Node) XXX_Merge(src proto.Message)
- func (m *Node) XXX_Size() int
- func (m *Node) XXX_Unmarshal(b []byte) error
- type PingMessageInput
- func (*PingMessageInput) Descriptor() ([]byte, []int)
- func (m *PingMessageInput) GetJoins() []*Node
- func (m *PingMessageInput) GetLeaves() []*Node
- func (m *PingMessageInput) GetSource() *Node
- func (m *PingMessageInput) GetTimestamp() int64
- func (*PingMessageInput) ProtoMessage()
- func (m *PingMessageInput) Reset()
- func (m *PingMessageInput) String() string
- func (m *PingMessageInput) XXX_DiscardUnknown()
- func (m *PingMessageInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PingMessageInput) XXX_Merge(src proto.Message)
- func (m *PingMessageInput) XXX_Size() int
- func (m *PingMessageInput) XXX_Unmarshal(b []byte) error
- type PingMessageOutput
- func (*PingMessageOutput) Descriptor() ([]byte, []int)
- func (m *PingMessageOutput) GetSuccess() bool
- func (m *PingMessageOutput) GetTimestamp() int64
- func (*PingMessageOutput) ProtoMessage()
- func (m *PingMessageOutput) Reset()
- func (m *PingMessageOutput) String() string
- func (m *PingMessageOutput) XXX_DiscardUnknown()
- func (m *PingMessageOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PingMessageOutput) XXX_Merge(src proto.Message)
- func (m *PingMessageOutput) XXX_Size() int
- func (m *PingMessageOutput) XXX_Unmarshal(b []byte) error
- type PingRequestMessageInput
- func (*PingRequestMessageInput) Descriptor() ([]byte, []int)
- func (m *PingRequestMessageInput) GetRemoteNode() *Node
- func (m *PingRequestMessageInput) GetSource() *Node
- func (m *PingRequestMessageInput) GetTimestamp() int64
- func (*PingRequestMessageInput) ProtoMessage()
- func (m *PingRequestMessageInput) Reset()
- func (m *PingRequestMessageInput) String() string
- func (m *PingRequestMessageInput) XXX_DiscardUnknown()
- func (m *PingRequestMessageInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PingRequestMessageInput) XXX_Merge(src proto.Message)
- func (m *PingRequestMessageInput) XXX_Size() int
- func (m *PingRequestMessageInput) XXX_Unmarshal(b []byte) error
- type SwimClient
- type SwimServer
- type UnimplementedSwimServer
- func (*UnimplementedSwimServer) Join(ctx context.Context, req *JoinMessageInput) (*JoinMessageOutput, error)
- func (*UnimplementedSwimServer) Leave(ctx context.Context, req *LeaveMessageInput) (*LeaveMessageOutput, error)
- func (*UnimplementedSwimServer) Ping(ctx context.Context, req *PingMessageInput) (*PingMessageOutput, error)
- func (*UnimplementedSwimServer) PingRequest(ctx context.Context, req *PingRequestMessageInput) (*PingMessageOutput, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSwimServer ¶
func RegisterSwimServer(s *grpc.Server, srv SwimServer)
Types ¶
type JoinMessageInput ¶
type JoinMessageInput struct {
Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
Node *Node `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*JoinMessageInput) Descriptor ¶
func (*JoinMessageInput) Descriptor() ([]byte, []int)
func (*JoinMessageInput) GetNode ¶
func (m *JoinMessageInput) GetNode() *Node
func (*JoinMessageInput) GetTimestamp ¶
func (m *JoinMessageInput) GetTimestamp() int64
func (*JoinMessageInput) ProtoMessage ¶
func (*JoinMessageInput) ProtoMessage()
func (*JoinMessageInput) Reset ¶
func (m *JoinMessageInput) Reset()
func (*JoinMessageInput) String ¶
func (m *JoinMessageInput) String() string
func (*JoinMessageInput) XXX_DiscardUnknown ¶
func (m *JoinMessageInput) XXX_DiscardUnknown()
func (*JoinMessageInput) XXX_Marshal ¶
func (m *JoinMessageInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*JoinMessageInput) XXX_Merge ¶
func (m *JoinMessageInput) XXX_Merge(src proto.Message)
func (*JoinMessageInput) XXX_Size ¶
func (m *JoinMessageInput) XXX_Size() int
func (*JoinMessageInput) XXX_Unmarshal ¶
func (m *JoinMessageInput) XXX_Unmarshal(b []byte) error
type JoinMessageOutput ¶
type JoinMessageOutput struct {
Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
Nodes []*Node `protobuf:"bytes,2,rep,name=Nodes,proto3" json:"Nodes,omitempty"`
Success bool `protobuf:"varint,3,opt,name=Success,proto3" json:"Success,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*JoinMessageOutput) Descriptor ¶
func (*JoinMessageOutput) Descriptor() ([]byte, []int)
func (*JoinMessageOutput) GetNodes ¶
func (m *JoinMessageOutput) GetNodes() []*Node
func (*JoinMessageOutput) GetSuccess ¶
func (m *JoinMessageOutput) GetSuccess() bool
func (*JoinMessageOutput) GetTimestamp ¶
func (m *JoinMessageOutput) GetTimestamp() int64
func (*JoinMessageOutput) ProtoMessage ¶
func (*JoinMessageOutput) ProtoMessage()
func (*JoinMessageOutput) Reset ¶
func (m *JoinMessageOutput) Reset()
func (*JoinMessageOutput) String ¶
func (m *JoinMessageOutput) String() string
func (*JoinMessageOutput) XXX_DiscardUnknown ¶
func (m *JoinMessageOutput) XXX_DiscardUnknown()
func (*JoinMessageOutput) XXX_Marshal ¶
func (m *JoinMessageOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*JoinMessageOutput) XXX_Merge ¶
func (m *JoinMessageOutput) XXX_Merge(src proto.Message)
func (*JoinMessageOutput) XXX_Size ¶
func (m *JoinMessageOutput) XXX_Size() int
func (*JoinMessageOutput) XXX_Unmarshal ¶
func (m *JoinMessageOutput) XXX_Unmarshal(b []byte) error
type LeaveMessageInput ¶
type LeaveMessageInput struct {
Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
Node *Node `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*LeaveMessageInput) Descriptor ¶
func (*LeaveMessageInput) Descriptor() ([]byte, []int)
func (*LeaveMessageInput) GetNode ¶
func (m *LeaveMessageInput) GetNode() *Node
func (*LeaveMessageInput) GetTimestamp ¶
func (m *LeaveMessageInput) GetTimestamp() int64
func (*LeaveMessageInput) ProtoMessage ¶
func (*LeaveMessageInput) ProtoMessage()
func (*LeaveMessageInput) Reset ¶
func (m *LeaveMessageInput) Reset()
func (*LeaveMessageInput) String ¶
func (m *LeaveMessageInput) String() string
func (*LeaveMessageInput) XXX_DiscardUnknown ¶
func (m *LeaveMessageInput) XXX_DiscardUnknown()
func (*LeaveMessageInput) XXX_Marshal ¶
func (m *LeaveMessageInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LeaveMessageInput) XXX_Merge ¶
func (m *LeaveMessageInput) XXX_Merge(src proto.Message)
func (*LeaveMessageInput) XXX_Size ¶
func (m *LeaveMessageInput) XXX_Size() int
func (*LeaveMessageInput) XXX_Unmarshal ¶
func (m *LeaveMessageInput) XXX_Unmarshal(b []byte) error
type LeaveMessageOutput ¶
type LeaveMessageOutput struct {
Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
Success bool `protobuf:"varint,2,opt,name=Success,proto3" json:"Success,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*LeaveMessageOutput) Descriptor ¶
func (*LeaveMessageOutput) Descriptor() ([]byte, []int)
func (*LeaveMessageOutput) GetSuccess ¶
func (m *LeaveMessageOutput) GetSuccess() bool
func (*LeaveMessageOutput) GetTimestamp ¶
func (m *LeaveMessageOutput) GetTimestamp() int64
func (*LeaveMessageOutput) ProtoMessage ¶
func (*LeaveMessageOutput) ProtoMessage()
func (*LeaveMessageOutput) Reset ¶
func (m *LeaveMessageOutput) Reset()
func (*LeaveMessageOutput) String ¶
func (m *LeaveMessageOutput) String() string
func (*LeaveMessageOutput) XXX_DiscardUnknown ¶
func (m *LeaveMessageOutput) XXX_DiscardUnknown()
func (*LeaveMessageOutput) XXX_Marshal ¶
func (m *LeaveMessageOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LeaveMessageOutput) XXX_Merge ¶
func (m *LeaveMessageOutput) XXX_Merge(src proto.Message)
func (*LeaveMessageOutput) XXX_Size ¶
func (m *LeaveMessageOutput) XXX_Size() int
func (*LeaveMessageOutput) XXX_Unmarshal ¶
func (m *LeaveMessageOutput) XXX_Unmarshal(b []byte) error
type Node ¶
type Node struct {
Address string `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
Port uint32 `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
LastSeen int64 `protobuf:"varint,4,opt,name=LastSeen,proto3" json:"LastSeen,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Node) Descriptor ¶
func (*Node) GetAddress ¶
func (*Node) GetLastSeen ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) XXX_DiscardUnknown ¶
func (m *Node) XXX_DiscardUnknown()
func (*Node) XXX_Unmarshal ¶
type PingMessageInput ¶
type PingMessageInput struct {
Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
Source *Node `protobuf:"bytes,2,opt,name=Source,proto3" json:"Source,omitempty"`
Joins []*Node `protobuf:"bytes,3,rep,name=Joins,proto3" json:"Joins,omitempty"`
Leaves []*Node `protobuf:"bytes,4,rep,name=Leaves,proto3" json:"Leaves,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PingMessageInput) Descriptor ¶
func (*PingMessageInput) Descriptor() ([]byte, []int)
func (*PingMessageInput) GetJoins ¶
func (m *PingMessageInput) GetJoins() []*Node
func (*PingMessageInput) GetLeaves ¶
func (m *PingMessageInput) GetLeaves() []*Node
func (*PingMessageInput) GetSource ¶
func (m *PingMessageInput) GetSource() *Node
func (*PingMessageInput) GetTimestamp ¶
func (m *PingMessageInput) GetTimestamp() int64
func (*PingMessageInput) ProtoMessage ¶
func (*PingMessageInput) ProtoMessage()
func (*PingMessageInput) Reset ¶
func (m *PingMessageInput) Reset()
func (*PingMessageInput) String ¶
func (m *PingMessageInput) String() string
func (*PingMessageInput) XXX_DiscardUnknown ¶
func (m *PingMessageInput) XXX_DiscardUnknown()
func (*PingMessageInput) XXX_Marshal ¶
func (m *PingMessageInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PingMessageInput) XXX_Merge ¶
func (m *PingMessageInput) XXX_Merge(src proto.Message)
func (*PingMessageInput) XXX_Size ¶
func (m *PingMessageInput) XXX_Size() int
func (*PingMessageInput) XXX_Unmarshal ¶
func (m *PingMessageInput) XXX_Unmarshal(b []byte) error
type PingMessageOutput ¶
type PingMessageOutput struct {
Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
Success bool `protobuf:"varint,2,opt,name=Success,proto3" json:"Success,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PingMessageOutput) Descriptor ¶
func (*PingMessageOutput) Descriptor() ([]byte, []int)
func (*PingMessageOutput) GetSuccess ¶
func (m *PingMessageOutput) GetSuccess() bool
func (*PingMessageOutput) GetTimestamp ¶
func (m *PingMessageOutput) GetTimestamp() int64
func (*PingMessageOutput) ProtoMessage ¶
func (*PingMessageOutput) ProtoMessage()
func (*PingMessageOutput) Reset ¶
func (m *PingMessageOutput) Reset()
func (*PingMessageOutput) String ¶
func (m *PingMessageOutput) String() string
func (*PingMessageOutput) XXX_DiscardUnknown ¶
func (m *PingMessageOutput) XXX_DiscardUnknown()
func (*PingMessageOutput) XXX_Marshal ¶
func (m *PingMessageOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PingMessageOutput) XXX_Merge ¶
func (m *PingMessageOutput) XXX_Merge(src proto.Message)
func (*PingMessageOutput) XXX_Size ¶
func (m *PingMessageOutput) XXX_Size() int
func (*PingMessageOutput) XXX_Unmarshal ¶
func (m *PingMessageOutput) XXX_Unmarshal(b []byte) error
type PingRequestMessageInput ¶
type PingRequestMessageInput struct {
Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
Source *Node `protobuf:"bytes,2,opt,name=Source,proto3" json:"Source,omitempty"`
RemoteNode *Node `protobuf:"bytes,3,opt,name=RemoteNode,proto3" json:"RemoteNode,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PingRequestMessageInput) Descriptor ¶
func (*PingRequestMessageInput) Descriptor() ([]byte, []int)
func (*PingRequestMessageInput) GetRemoteNode ¶
func (m *PingRequestMessageInput) GetRemoteNode() *Node
func (*PingRequestMessageInput) GetSource ¶
func (m *PingRequestMessageInput) GetSource() *Node
func (*PingRequestMessageInput) GetTimestamp ¶
func (m *PingRequestMessageInput) GetTimestamp() int64
func (*PingRequestMessageInput) ProtoMessage ¶
func (*PingRequestMessageInput) ProtoMessage()
func (*PingRequestMessageInput) Reset ¶
func (m *PingRequestMessageInput) Reset()
func (*PingRequestMessageInput) String ¶
func (m *PingRequestMessageInput) String() string
func (*PingRequestMessageInput) XXX_DiscardUnknown ¶
func (m *PingRequestMessageInput) XXX_DiscardUnknown()
func (*PingRequestMessageInput) XXX_Marshal ¶
func (m *PingRequestMessageInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PingRequestMessageInput) XXX_Merge ¶
func (m *PingRequestMessageInput) XXX_Merge(src proto.Message)
func (*PingRequestMessageInput) XXX_Size ¶
func (m *PingRequestMessageInput) XXX_Size() int
func (*PingRequestMessageInput) XXX_Unmarshal ¶
func (m *PingRequestMessageInput) XXX_Unmarshal(b []byte) error
type SwimClient ¶
type SwimClient interface {
Join(ctx context.Context, in *JoinMessageInput, opts ...grpc.CallOption) (*JoinMessageOutput, error)
Leave(ctx context.Context, in *LeaveMessageInput, opts ...grpc.CallOption) (*LeaveMessageOutput, error)
Ping(ctx context.Context, in *PingMessageInput, opts ...grpc.CallOption) (*PingMessageOutput, error)
PingRequest(ctx context.Context, in *PingRequestMessageInput, opts ...grpc.CallOption) (*PingMessageOutput, error)
}
SwimClient is the client API for Swim service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSwimClient ¶
func NewSwimClient(cc grpc.ClientConnInterface) SwimClient
type SwimServer ¶
type SwimServer interface {
Join(context.Context, *JoinMessageInput) (*JoinMessageOutput, error)
Leave(context.Context, *LeaveMessageInput) (*LeaveMessageOutput, error)
Ping(context.Context, *PingMessageInput) (*PingMessageOutput, error)
PingRequest(context.Context, *PingRequestMessageInput) (*PingMessageOutput, error)
}
SwimServer is the server API for Swim service.
type UnimplementedSwimServer ¶
type UnimplementedSwimServer struct {
}
UnimplementedSwimServer can be embedded to have forward compatible implementations.
func (*UnimplementedSwimServer) Join ¶
func (*UnimplementedSwimServer) Join(ctx context.Context, req *JoinMessageInput) (*JoinMessageOutput, error)
func (*UnimplementedSwimServer) Leave ¶
func (*UnimplementedSwimServer) Leave(ctx context.Context, req *LeaveMessageInput) (*LeaveMessageOutput, error)
func (*UnimplementedSwimServer) Ping ¶
func (*UnimplementedSwimServer) Ping(ctx context.Context, req *PingMessageInput) (*PingMessageOutput, error)
func (*UnimplementedSwimServer) PingRequest ¶
func (*UnimplementedSwimServer) PingRequest(ctx context.Context, req *PingRequestMessageInput) (*PingMessageOutput, error)
Click to show internal directories.
Click to hide internal directories.