Documentation ¶
Index ¶
- Variables
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (m *GetRequest) Marshal() (dAtA []byte, err error)
- func (m *GetRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) Size() (n int)
- func (m *GetRequest) String() string
- func (m *GetRequest) Unmarshal(dAtA []byte) error
- func (m *GetRequest) XXX_DiscardUnknown()
- func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRequest) XXX_Merge(src proto.Message)
- func (m *GetRequest) XXX_Size() int
- func (m *GetRequest) XXX_Unmarshal(b []byte) error
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)
- func (m *GetResponse) GetLatch() *Latch
- func (m *GetResponse) Marshal() (dAtA []byte, err error)
- func (m *GetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetResponse) ProtoMessage()
- func (m *GetResponse) Reset()
- func (m *GetResponse) Size() (n int)
- func (m *GetResponse) String() string
- func (m *GetResponse) Unmarshal(dAtA []byte) error
- func (m *GetResponse) XXX_DiscardUnknown()
- func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetResponse) XXX_Merge(src proto.Message)
- func (m *GetResponse) XXX_Size() int
- func (m *GetResponse) XXX_Unmarshal(b []byte) error
- type Latch
- func (*Latch) Descriptor() ([]byte, []int)
- func (m *Latch) GetID() uint64
- func (m *Latch) GetLeader() string
- func (m *Latch) GetParticipants() []string
- func (m *Latch) Marshal() (dAtA []byte, err error)
- func (m *Latch) MarshalTo(dAtA []byte) (int, error)
- func (m *Latch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Latch) ProtoMessage()
- func (m *Latch) Reset()
- func (m *Latch) Size() (n int)
- func (m *Latch) String() string
- func (m *Latch) Unmarshal(dAtA []byte) error
- func (m *Latch) XXX_DiscardUnknown()
- func (m *Latch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Latch) XXX_Merge(src proto.Message)
- func (m *Latch) XXX_Size() int
- func (m *Latch) XXX_Unmarshal(b []byte) error
- type LatchParticipant
- func (*LatchParticipant) Descriptor() ([]byte, []int)
- func (m *LatchParticipant) GetID() string
- func (m *LatchParticipant) GetSessionID() uint64
- func (m *LatchParticipant) Marshal() (dAtA []byte, err error)
- func (m *LatchParticipant) MarshalTo(dAtA []byte) (int, error)
- func (m *LatchParticipant) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LatchParticipant) ProtoMessage()
- func (m *LatchParticipant) Reset()
- func (m *LatchParticipant) Size() (n int)
- func (m *LatchParticipant) String() string
- func (m *LatchParticipant) Unmarshal(dAtA []byte) error
- func (m *LatchParticipant) XXX_DiscardUnknown()
- func (m *LatchParticipant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LatchParticipant) XXX_Merge(src proto.Message)
- func (m *LatchParticipant) XXX_Size() int
- func (m *LatchParticipant) XXX_Unmarshal(b []byte) error
- type LatchRequest
- func (*LatchRequest) Descriptor() ([]byte, []int)
- func (m *LatchRequest) GetID() string
- func (m *LatchRequest) Marshal() (dAtA []byte, err error)
- func (m *LatchRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *LatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LatchRequest) ProtoMessage()
- func (m *LatchRequest) Reset()
- func (m *LatchRequest) Size() (n int)
- func (m *LatchRequest) String() string
- func (m *LatchRequest) Unmarshal(dAtA []byte) error
- func (m *LatchRequest) XXX_DiscardUnknown()
- func (m *LatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LatchRequest) XXX_Merge(src proto.Message)
- func (m *LatchRequest) XXX_Size() int
- func (m *LatchRequest) XXX_Unmarshal(b []byte) error
- type LatchResponse
- func (*LatchResponse) Descriptor() ([]byte, []int)
- func (m *LatchResponse) GetLatch() *Latch
- func (m *LatchResponse) Marshal() (dAtA []byte, err error)
- func (m *LatchResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *LatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LatchResponse) ProtoMessage()
- func (m *LatchResponse) Reset()
- func (m *LatchResponse) Size() (n int)
- func (m *LatchResponse) String() string
- func (m *LatchResponse) Unmarshal(dAtA []byte) error
- func (m *LatchResponse) XXX_DiscardUnknown()
- func (m *LatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LatchResponse) XXX_Merge(src proto.Message)
- func (m *LatchResponse) XXX_Size() int
- func (m *LatchResponse) XXX_Unmarshal(b []byte) error
- type LatchSnapshot
- func (*LatchSnapshot) Descriptor() ([]byte, []int)
- func (m *LatchSnapshot) GetLatch() uint64
- func (m *LatchSnapshot) GetLeader() *LatchParticipant
- func (m *LatchSnapshot) GetParticipants() []*LatchParticipant
- func (m *LatchSnapshot) Marshal() (dAtA []byte, err error)
- func (m *LatchSnapshot) MarshalTo(dAtA []byte) (int, error)
- func (m *LatchSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LatchSnapshot) ProtoMessage()
- func (m *LatchSnapshot) Reset()
- func (m *LatchSnapshot) Size() (n int)
- func (m *LatchSnapshot) String() string
- func (m *LatchSnapshot) Unmarshal(dAtA []byte) error
- func (m *LatchSnapshot) XXX_DiscardUnknown()
- func (m *LatchSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LatchSnapshot) XXX_Merge(src proto.Message)
- func (m *LatchSnapshot) XXX_Size() int
- func (m *LatchSnapshot) XXX_Unmarshal(b []byte) error
- type ListenRequest
- func (*ListenRequest) Descriptor() ([]byte, []int)
- func (m *ListenRequest) Marshal() (dAtA []byte, err error)
- func (m *ListenRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenRequest) ProtoMessage()
- func (m *ListenRequest) Reset()
- func (m *ListenRequest) Size() (n int)
- func (m *ListenRequest) String() string
- func (m *ListenRequest) Unmarshal(dAtA []byte) error
- func (m *ListenRequest) XXX_DiscardUnknown()
- func (m *ListenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenRequest) XXX_Merge(src proto.Message)
- func (m *ListenRequest) XXX_Size() int
- func (m *ListenRequest) XXX_Unmarshal(b []byte) error
- type ListenResponse
- func (*ListenResponse) Descriptor() ([]byte, []int)
- func (m *ListenResponse) GetLatch() *Latch
- func (m *ListenResponse) GetType() ListenResponse_Type
- func (m *ListenResponse) Marshal() (dAtA []byte, err error)
- func (m *ListenResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ListenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListenResponse) ProtoMessage()
- func (m *ListenResponse) Reset()
- func (m *ListenResponse) Size() (n int)
- func (m *ListenResponse) String() string
- func (m *ListenResponse) Unmarshal(dAtA []byte) error
- func (m *ListenResponse) XXX_DiscardUnknown()
- func (m *ListenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListenResponse) XXX_Merge(src proto.Message)
- func (m *ListenResponse) XXX_Size() int
- func (m *ListenResponse) XXX_Unmarshal(b []byte) error
- type ListenResponse_Type
- type Server
- func (s *Server) Close(ctx context.Context, request *api.CloseRequest) (*api.CloseResponse, error)
- func (s *Server) Create(ctx context.Context, request *api.CreateRequest) (*api.CreateResponse, error)
- func (s *Server) Events(request *api.EventRequest, srv api.LeaderLatchService_EventsServer) error
- func (s *Server) Get(ctx context.Context, request *api.GetRequest) (*api.GetResponse, error)
- func (s *Server) KeepAlive(ctx context.Context, request *api.KeepAliveRequest) (*api.KeepAliveResponse, error)
- func (s *Server) Latch(ctx context.Context, request *api.LatchRequest) (*api.LatchResponse, error)
- type Service
- func (e *Service) Events(bytes []byte, stream stream.WriteStream)
- func (e *Service) GetLatch(bytes []byte) ([]byte, error)
- func (e *Service) Install(reader io.Reader) error
- func (e *Service) Latch(bytes []byte) ([]byte, error)
- func (e *Service) OnClose(session *service.Session)
- func (e *Service) OnExpire(session *service.Session)
- func (e *Service) Snapshot(writer io.Writer) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthLatch = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLatch = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLatch = fmt.Errorf("proto: unexpected end of group") )
View Source
var ListenResponse_Type_name = map[int32]string{
0: "CHANGED",
}
View Source
var ListenResponse_Type_value = map[string]int32{
"CHANGED": 0,
}
Functions ¶
This section is empty.
Types ¶
type GetRequest ¶
type GetRequest struct { }
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) Marshal ¶
func (m *GetRequest) Marshal() (dAtA []byte, err error)
func (*GetRequest) MarshalToSizedBuffer ¶
func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) Size ¶
func (m *GetRequest) Size() (n int)
func (*GetRequest) String ¶
func (m *GetRequest) String() string
func (*GetRequest) Unmarshal ¶
func (m *GetRequest) Unmarshal(dAtA []byte) error
func (*GetRequest) XXX_DiscardUnknown ¶
func (m *GetRequest) XXX_DiscardUnknown()
func (*GetRequest) XXX_Marshal ¶
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRequest) XXX_Merge ¶
func (m *GetRequest) XXX_Merge(src proto.Message)
func (*GetRequest) XXX_Size ¶
func (m *GetRequest) XXX_Size() int
func (*GetRequest) XXX_Unmarshal ¶
func (m *GetRequest) XXX_Unmarshal(b []byte) error
type GetResponse ¶
type GetResponse struct {
Latch *Latch `protobuf:"bytes,2,opt,name=latch,proto3" json:"latch,omitempty"`
}
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetLatch ¶
func (m *GetResponse) GetLatch() *Latch
func (*GetResponse) Marshal ¶
func (m *GetResponse) Marshal() (dAtA []byte, err error)
func (*GetResponse) MarshalToSizedBuffer ¶
func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) Size ¶
func (m *GetResponse) Size() (n int)
func (*GetResponse) String ¶
func (m *GetResponse) String() string
func (*GetResponse) Unmarshal ¶
func (m *GetResponse) Unmarshal(dAtA []byte) error
func (*GetResponse) XXX_DiscardUnknown ¶
func (m *GetResponse) XXX_DiscardUnknown()
func (*GetResponse) XXX_Marshal ¶
func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetResponse) XXX_Merge ¶
func (m *GetResponse) XXX_Merge(src proto.Message)
func (*GetResponse) XXX_Size ¶
func (m *GetResponse) XXX_Size() int
func (*GetResponse) XXX_Unmarshal ¶
func (m *GetResponse) XXX_Unmarshal(b []byte) error
type Latch ¶
type Latch struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Leader string `protobuf:"bytes,2,opt,name=leader,proto3" json:"leader,omitempty"` Participants []string `protobuf:"bytes,3,rep,name=participants,proto3" json:"participants,omitempty"` }
func (*Latch) Descriptor ¶
func (*Latch) GetParticipants ¶
func (*Latch) ProtoMessage ¶
func (*Latch) ProtoMessage()
func (*Latch) XXX_DiscardUnknown ¶
func (m *Latch) XXX_DiscardUnknown()
func (*Latch) XXX_Marshal ¶
func (*Latch) XXX_Unmarshal ¶
type LatchParticipant ¶
type LatchParticipant struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` SessionID uint64 `protobuf:"varint,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` }
Latch participant
func (*LatchParticipant) Descriptor ¶
func (*LatchParticipant) Descriptor() ([]byte, []int)
func (*LatchParticipant) GetID ¶
func (m *LatchParticipant) GetID() string
func (*LatchParticipant) GetSessionID ¶
func (m *LatchParticipant) GetSessionID() uint64
func (*LatchParticipant) Marshal ¶
func (m *LatchParticipant) Marshal() (dAtA []byte, err error)
func (*LatchParticipant) MarshalToSizedBuffer ¶
func (m *LatchParticipant) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LatchParticipant) ProtoMessage ¶
func (*LatchParticipant) ProtoMessage()
func (*LatchParticipant) Reset ¶
func (m *LatchParticipant) Reset()
func (*LatchParticipant) Size ¶
func (m *LatchParticipant) Size() (n int)
func (*LatchParticipant) String ¶
func (m *LatchParticipant) String() string
func (*LatchParticipant) Unmarshal ¶
func (m *LatchParticipant) Unmarshal(dAtA []byte) error
func (*LatchParticipant) XXX_DiscardUnknown ¶
func (m *LatchParticipant) XXX_DiscardUnknown()
func (*LatchParticipant) XXX_Marshal ¶
func (m *LatchParticipant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LatchParticipant) XXX_Merge ¶
func (m *LatchParticipant) XXX_Merge(src proto.Message)
func (*LatchParticipant) XXX_Size ¶
func (m *LatchParticipant) XXX_Size() int
func (*LatchParticipant) XXX_Unmarshal ¶
func (m *LatchParticipant) XXX_Unmarshal(b []byte) error
type LatchRequest ¶
type LatchRequest struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (*LatchRequest) Descriptor ¶
func (*LatchRequest) Descriptor() ([]byte, []int)
func (*LatchRequest) GetID ¶
func (m *LatchRequest) GetID() string
func (*LatchRequest) Marshal ¶
func (m *LatchRequest) Marshal() (dAtA []byte, err error)
func (*LatchRequest) MarshalToSizedBuffer ¶
func (m *LatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LatchRequest) ProtoMessage ¶
func (*LatchRequest) ProtoMessage()
func (*LatchRequest) Reset ¶
func (m *LatchRequest) Reset()
func (*LatchRequest) Size ¶
func (m *LatchRequest) Size() (n int)
func (*LatchRequest) String ¶
func (m *LatchRequest) String() string
func (*LatchRequest) Unmarshal ¶
func (m *LatchRequest) Unmarshal(dAtA []byte) error
func (*LatchRequest) XXX_DiscardUnknown ¶
func (m *LatchRequest) XXX_DiscardUnknown()
func (*LatchRequest) XXX_Marshal ¶
func (m *LatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LatchRequest) XXX_Merge ¶
func (m *LatchRequest) XXX_Merge(src proto.Message)
func (*LatchRequest) XXX_Size ¶
func (m *LatchRequest) XXX_Size() int
func (*LatchRequest) XXX_Unmarshal ¶
func (m *LatchRequest) XXX_Unmarshal(b []byte) error
type LatchResponse ¶
type LatchResponse struct {
Latch *Latch `protobuf:"bytes,1,opt,name=latch,proto3" json:"latch,omitempty"`
}
func (*LatchResponse) Descriptor ¶
func (*LatchResponse) Descriptor() ([]byte, []int)
func (*LatchResponse) GetLatch ¶
func (m *LatchResponse) GetLatch() *Latch
func (*LatchResponse) Marshal ¶
func (m *LatchResponse) Marshal() (dAtA []byte, err error)
func (*LatchResponse) MarshalToSizedBuffer ¶
func (m *LatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LatchResponse) ProtoMessage ¶
func (*LatchResponse) ProtoMessage()
func (*LatchResponse) Reset ¶
func (m *LatchResponse) Reset()
func (*LatchResponse) Size ¶
func (m *LatchResponse) Size() (n int)
func (*LatchResponse) String ¶
func (m *LatchResponse) String() string
func (*LatchResponse) Unmarshal ¶
func (m *LatchResponse) Unmarshal(dAtA []byte) error
func (*LatchResponse) XXX_DiscardUnknown ¶
func (m *LatchResponse) XXX_DiscardUnknown()
func (*LatchResponse) XXX_Marshal ¶
func (m *LatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LatchResponse) XXX_Merge ¶
func (m *LatchResponse) XXX_Merge(src proto.Message)
func (*LatchResponse) XXX_Size ¶
func (m *LatchResponse) XXX_Size() int
func (*LatchResponse) XXX_Unmarshal ¶
func (m *LatchResponse) XXX_Unmarshal(b []byte) error
type LatchSnapshot ¶
type LatchSnapshot struct { Latch uint64 `protobuf:"varint,1,opt,name=latch,proto3" json:"latch,omitempty"` Leader *LatchParticipant `protobuf:"bytes,2,opt,name=leader,proto3" json:"leader,omitempty"` Participants []*LatchParticipant `protobuf:"bytes,3,rep,name=participants,proto3" json:"participants,omitempty"` }
LatchSnapshot snapshot
func (*LatchSnapshot) Descriptor ¶
func (*LatchSnapshot) Descriptor() ([]byte, []int)
func (*LatchSnapshot) GetLatch ¶
func (m *LatchSnapshot) GetLatch() uint64
func (*LatchSnapshot) GetLeader ¶
func (m *LatchSnapshot) GetLeader() *LatchParticipant
func (*LatchSnapshot) GetParticipants ¶
func (m *LatchSnapshot) GetParticipants() []*LatchParticipant
func (*LatchSnapshot) Marshal ¶
func (m *LatchSnapshot) Marshal() (dAtA []byte, err error)
func (*LatchSnapshot) MarshalToSizedBuffer ¶
func (m *LatchSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LatchSnapshot) ProtoMessage ¶
func (*LatchSnapshot) ProtoMessage()
func (*LatchSnapshot) Reset ¶
func (m *LatchSnapshot) Reset()
func (*LatchSnapshot) Size ¶
func (m *LatchSnapshot) Size() (n int)
func (*LatchSnapshot) String ¶
func (m *LatchSnapshot) String() string
func (*LatchSnapshot) Unmarshal ¶
func (m *LatchSnapshot) Unmarshal(dAtA []byte) error
func (*LatchSnapshot) XXX_DiscardUnknown ¶
func (m *LatchSnapshot) XXX_DiscardUnknown()
func (*LatchSnapshot) XXX_Marshal ¶
func (m *LatchSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LatchSnapshot) XXX_Merge ¶
func (m *LatchSnapshot) XXX_Merge(src proto.Message)
func (*LatchSnapshot) XXX_Size ¶
func (m *LatchSnapshot) XXX_Size() int
func (*LatchSnapshot) XXX_Unmarshal ¶
func (m *LatchSnapshot) XXX_Unmarshal(b []byte) error
type ListenRequest ¶
type ListenRequest struct { }
func (*ListenRequest) Descriptor ¶
func (*ListenRequest) Descriptor() ([]byte, []int)
func (*ListenRequest) Marshal ¶
func (m *ListenRequest) Marshal() (dAtA []byte, err error)
func (*ListenRequest) MarshalToSizedBuffer ¶
func (m *ListenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenRequest) ProtoMessage ¶
func (*ListenRequest) ProtoMessage()
func (*ListenRequest) Reset ¶
func (m *ListenRequest) Reset()
func (*ListenRequest) Size ¶
func (m *ListenRequest) Size() (n int)
func (*ListenRequest) String ¶
func (m *ListenRequest) String() string
func (*ListenRequest) Unmarshal ¶
func (m *ListenRequest) Unmarshal(dAtA []byte) error
func (*ListenRequest) XXX_DiscardUnknown ¶
func (m *ListenRequest) XXX_DiscardUnknown()
func (*ListenRequest) XXX_Marshal ¶
func (m *ListenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenRequest) XXX_Merge ¶
func (m *ListenRequest) XXX_Merge(src proto.Message)
func (*ListenRequest) XXX_Size ¶
func (m *ListenRequest) XXX_Size() int
func (*ListenRequest) XXX_Unmarshal ¶
func (m *ListenRequest) XXX_Unmarshal(b []byte) error
type ListenResponse ¶
type ListenResponse struct { Type ListenResponse_Type `protobuf:"varint,1,opt,name=type,proto3,enum=atomix.latch.service.ListenResponse_Type" json:"type,omitempty"` Latch *Latch `protobuf:"bytes,2,opt,name=latch,proto3" json:"latch,omitempty"` }
func (*ListenResponse) Descriptor ¶
func (*ListenResponse) Descriptor() ([]byte, []int)
func (*ListenResponse) GetLatch ¶
func (m *ListenResponse) GetLatch() *Latch
func (*ListenResponse) GetType ¶
func (m *ListenResponse) GetType() ListenResponse_Type
func (*ListenResponse) Marshal ¶
func (m *ListenResponse) Marshal() (dAtA []byte, err error)
func (*ListenResponse) MarshalToSizedBuffer ¶
func (m *ListenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListenResponse) ProtoMessage ¶
func (*ListenResponse) ProtoMessage()
func (*ListenResponse) Reset ¶
func (m *ListenResponse) Reset()
func (*ListenResponse) Size ¶
func (m *ListenResponse) Size() (n int)
func (*ListenResponse) String ¶
func (m *ListenResponse) String() string
func (*ListenResponse) Unmarshal ¶
func (m *ListenResponse) Unmarshal(dAtA []byte) error
func (*ListenResponse) XXX_DiscardUnknown ¶
func (m *ListenResponse) XXX_DiscardUnknown()
func (*ListenResponse) XXX_Marshal ¶
func (m *ListenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListenResponse) XXX_Merge ¶
func (m *ListenResponse) XXX_Merge(src proto.Message)
func (*ListenResponse) XXX_Size ¶
func (m *ListenResponse) XXX_Size() int
func (*ListenResponse) XXX_Unmarshal ¶
func (m *ListenResponse) XXX_Unmarshal(b []byte) error
type ListenResponse_Type ¶
type ListenResponse_Type int32
const (
ListenResponse_CHANGED ListenResponse_Type = 0
)
func (ListenResponse_Type) EnumDescriptor ¶
func (ListenResponse_Type) EnumDescriptor() ([]byte, []int)
func (ListenResponse_Type) String ¶
func (x ListenResponse_Type) String() string
type Server ¶
type Server struct {
*server.SessionizedServer
}
Server is an implementation of LeaderElectionServiceServer for the election primitive
func (*Server) Close ¶
func (s *Server) Close(ctx context.Context, request *api.CloseRequest) (*api.CloseResponse, error)
Close closes a session
func (*Server) Create ¶
func (s *Server) Create(ctx context.Context, request *api.CreateRequest) (*api.CreateResponse, error)
Create opens a new session
func (*Server) Events ¶
func (s *Server) Events(request *api.EventRequest, srv api.LeaderLatchService_EventsServer) error
Events lists for election change events
func (*Server) Get ¶
func (s *Server) Get(ctx context.Context, request *api.GetRequest) (*api.GetResponse, error)
Get gets the current latch
func (*Server) KeepAlive ¶
func (s *Server) KeepAlive(ctx context.Context, request *api.KeepAliveRequest) (*api.KeepAliveResponse, error)
KeepAlive keeps an existing session alive
func (*Server) Latch ¶
func (s *Server) Latch(ctx context.Context, request *api.LatchRequest) (*api.LatchResponse, error)
Latch enters a candidate in the election
type Service ¶
type Service struct { *service.SessionizedService // contains filtered or unexported fields }
Service is a state machine for an election primitive
func (*Service) Events ¶
func (e *Service) Events(bytes []byte, stream stream.WriteStream)
Events registers the given channel to receive election events
Click to show internal directories.
Click to hide internal directories.