Documentation
¶
Overview ¶
Code generated by atomix-go-framework. DO NOT EDIT.
Code generated by atomix-go-framework. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func RegisterService(node *rsm.Node)
- type ClearProposal
- type ClearProposals
- type EntriesProposal
- type EntriesProposals
- type EventsProposal
- type EventsProposals
- type GetProposal
- type GetProposals
- type MapState
- func (*MapState) Descriptor() ([]byte, []int)
- func (m *MapState) GetEntries() []MapStateEntry
- func (m *MapState) GetListeners() []MapStateListener
- func (m *MapState) Marshal() (dAtA []byte, err error)
- func (m *MapState) MarshalTo(dAtA []byte) (int, error)
- func (m *MapState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapState) ProtoMessage()
- func (m *MapState) Reset()
- func (m *MapState) Size() (n int)
- func (m *MapState) String() string
- func (m *MapState) Unmarshal(dAtA []byte) error
- func (m *MapState) XXX_DiscardUnknown()
- func (m *MapState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapState) XXX_Merge(src proto.Message)
- func (m *MapState) XXX_Size() int
- func (m *MapState) XXX_Unmarshal(b []byte) error
- type MapStateEntry
- func (*MapStateEntry) Descriptor() ([]byte, []int)
- func (m *MapStateEntry) GetKey() MapStateKey
- func (m *MapStateEntry) GetValue() *MapStateValue
- func (m *MapStateEntry) Marshal() (dAtA []byte, err error)
- func (m *MapStateEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *MapStateEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapStateEntry) ProtoMessage()
- func (m *MapStateEntry) Reset()
- func (m *MapStateEntry) Size() (n int)
- func (m *MapStateEntry) String() string
- func (m *MapStateEntry) Unmarshal(dAtA []byte) error
- func (m *MapStateEntry) XXX_DiscardUnknown()
- func (m *MapStateEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapStateEntry) XXX_Merge(src proto.Message)
- func (m *MapStateEntry) XXX_Size() int
- func (m *MapStateEntry) XXX_Unmarshal(b []byte) error
- type MapStateKey
- func (*MapStateKey) Descriptor() ([]byte, []int)
- func (m *MapStateKey) GetKey() string
- func (m *MapStateKey) Marshal() (dAtA []byte, err error)
- func (m *MapStateKey) MarshalTo(dAtA []byte) (int, error)
- func (m *MapStateKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapStateKey) ProtoMessage()
- func (m *MapStateKey) Reset()
- func (m *MapStateKey) Size() (n int)
- func (m *MapStateKey) String() string
- func (m *MapStateKey) Unmarshal(dAtA []byte) error
- func (m *MapStateKey) XXX_DiscardUnknown()
- func (m *MapStateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapStateKey) XXX_Merge(src proto.Message)
- func (m *MapStateKey) XXX_Size() int
- func (m *MapStateKey) XXX_Unmarshal(b []byte) error
- type MapStateListener
- func (*MapStateListener) Descriptor() ([]byte, []int)
- func (m *MapStateListener) GetKey() string
- func (m *MapStateListener) GetProposalID() ProposalID
- func (m *MapStateListener) Marshal() (dAtA []byte, err error)
- func (m *MapStateListener) MarshalTo(dAtA []byte) (int, error)
- func (m *MapStateListener) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapStateListener) ProtoMessage()
- func (m *MapStateListener) Reset()
- func (m *MapStateListener) Size() (n int)
- func (m *MapStateListener) String() string
- func (m *MapStateListener) Unmarshal(dAtA []byte) error
- func (m *MapStateListener) XXX_DiscardUnknown()
- func (m *MapStateListener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapStateListener) XXX_Merge(src proto.Message)
- func (m *MapStateListener) XXX_Size() int
- func (m *MapStateListener) XXX_Unmarshal(b []byte) error
- type MapStateValue
- func (*MapStateValue) Descriptor() ([]byte, []int)
- func (m *MapStateValue) GetExpire() *time.Time
- func (m *MapStateValue) GetValue() []byte
- func (m *MapStateValue) Marshal() (dAtA []byte, err error)
- func (m *MapStateValue) MarshalTo(dAtA []byte) (int, error)
- func (m *MapStateValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapStateValue) ProtoMessage()
- func (m *MapStateValue) Reset()
- func (m *MapStateValue) Size() (n int)
- func (m *MapStateValue) String() string
- func (m *MapStateValue) Unmarshal(dAtA []byte) error
- func (m *MapStateValue) XXX_DiscardUnknown()
- func (m *MapStateValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapStateValue) XXX_Merge(src proto.Message)
- func (m *MapStateValue) XXX_Size() int
- func (m *MapStateValue) XXX_Unmarshal(b []byte) error
- type NewServiceFunc
- type Proposal
- type ProposalID
- type Proposals
- type PutProposal
- type PutProposals
- type RemoveProposal
- type RemoveProposals
- type Service
- type ServiceAdaptor
- type ServiceContext
- type Session
- type SessionID
- type SessionState
- type Sessions
- type SizeProposal
- type SizeProposals
- type SnapshotReader
- type SnapshotWriter
- type Watcher
Constants ¶
View Source
const Type = "Map"
Variables ¶
Functions ¶
func RegisterService ¶
RegisterService registers the election primitive service on the given node
Types ¶
type ClearProposal ¶
type ClearProposal interface {
Proposal
Request() *_map.ClearRequest
Reply(*_map.ClearResponse) error
// contains filtered or unexported methods
}
type ClearProposals ¶
type ClearProposals interface {
Get(ProposalID) (ClearProposal, bool)
List() []ClearProposal
// contains filtered or unexported methods
}
type EntriesProposal ¶
type EntriesProposal interface {
Proposal
Request() *_map.EntriesRequest
Notify(*_map.EntriesResponse) error
Close() error
}
type EntriesProposals ¶
type EntriesProposals interface {
Get(ProposalID) (EntriesProposal, bool)
List() []EntriesProposal
// contains filtered or unexported methods
}
type EventsProposal ¶
type EventsProposal interface {
Proposal
Request() *_map.EventsRequest
Notify(*_map.EventsResponse) error
Close() error
}
type EventsProposals ¶
type EventsProposals interface {
Get(ProposalID) (EventsProposal, bool)
List() []EventsProposal
// contains filtered or unexported methods
}
type GetProposal ¶
type GetProposal interface {
Proposal
Request() *_map.GetRequest
Reply(*_map.GetResponse) error
// contains filtered or unexported methods
}
type GetProposals ¶
type GetProposals interface {
Get(ProposalID) (GetProposal, bool)
List() []GetProposal
// contains filtered or unexported methods
}
type MapState ¶
type MapState struct {
Listeners []MapStateListener `protobuf:"bytes,1,rep,name=listeners,proto3" json:"listeners"`
Entries []MapStateEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"`
}
func (*MapState) Descriptor ¶
func (*MapState) GetEntries ¶
func (m *MapState) GetEntries() []MapStateEntry
func (*MapState) GetListeners ¶
func (m *MapState) GetListeners() []MapStateListener
func (*MapState) MarshalToSizedBuffer ¶
func (*MapState) ProtoMessage ¶
func (*MapState) ProtoMessage()
func (*MapState) XXX_DiscardUnknown ¶
func (m *MapState) XXX_DiscardUnknown()
func (*MapState) XXX_Marshal ¶
func (*MapState) XXX_Unmarshal ¶
type MapStateEntry ¶
type MapStateEntry struct {
Key MapStateKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
Value *MapStateValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (*MapStateEntry) Descriptor ¶
func (*MapStateEntry) Descriptor() ([]byte, []int)
func (*MapStateEntry) GetKey ¶
func (m *MapStateEntry) GetKey() MapStateKey
func (*MapStateEntry) GetValue ¶
func (m *MapStateEntry) GetValue() *MapStateValue
func (*MapStateEntry) Marshal ¶
func (m *MapStateEntry) Marshal() (dAtA []byte, err error)
func (*MapStateEntry) MarshalToSizedBuffer ¶
func (m *MapStateEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MapStateEntry) ProtoMessage ¶
func (*MapStateEntry) ProtoMessage()
func (*MapStateEntry) Reset ¶
func (m *MapStateEntry) Reset()
func (*MapStateEntry) Size ¶
func (m *MapStateEntry) Size() (n int)
func (*MapStateEntry) String ¶
func (m *MapStateEntry) String() string
func (*MapStateEntry) Unmarshal ¶
func (m *MapStateEntry) Unmarshal(dAtA []byte) error
func (*MapStateEntry) XXX_DiscardUnknown ¶
func (m *MapStateEntry) XXX_DiscardUnknown()
func (*MapStateEntry) XXX_Marshal ¶
func (m *MapStateEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MapStateEntry) XXX_Merge ¶
func (m *MapStateEntry) XXX_Merge(src proto.Message)
func (*MapStateEntry) XXX_Size ¶
func (m *MapStateEntry) XXX_Size() int
func (*MapStateEntry) XXX_Unmarshal ¶
func (m *MapStateEntry) XXX_Unmarshal(b []byte) error
type MapStateKey ¶
type MapStateKey struct {
meta.ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}
func (*MapStateKey) Descriptor ¶
func (*MapStateKey) Descriptor() ([]byte, []int)
func (*MapStateKey) GetKey ¶
func (m *MapStateKey) GetKey() string
func (*MapStateKey) Marshal ¶
func (m *MapStateKey) Marshal() (dAtA []byte, err error)
func (*MapStateKey) MarshalToSizedBuffer ¶
func (m *MapStateKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MapStateKey) ProtoMessage ¶
func (*MapStateKey) ProtoMessage()
func (*MapStateKey) Reset ¶
func (m *MapStateKey) Reset()
func (*MapStateKey) Size ¶
func (m *MapStateKey) Size() (n int)
func (*MapStateKey) String ¶
func (m *MapStateKey) String() string
func (*MapStateKey) Unmarshal ¶
func (m *MapStateKey) Unmarshal(dAtA []byte) error
func (*MapStateKey) XXX_DiscardUnknown ¶
func (m *MapStateKey) XXX_DiscardUnknown()
func (*MapStateKey) XXX_Marshal ¶
func (m *MapStateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MapStateKey) XXX_Merge ¶
func (m *MapStateKey) XXX_Merge(src proto.Message)
func (*MapStateKey) XXX_Size ¶
func (m *MapStateKey) XXX_Size() int
func (*MapStateKey) XXX_Unmarshal ¶
func (m *MapStateKey) XXX_Unmarshal(b []byte) error
type MapStateListener ¶
type MapStateListener struct {
ProposalID ProposalID `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3,casttype=ProposalID" json:"proposal_id,omitempty"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}
func (*MapStateListener) Descriptor ¶
func (*MapStateListener) Descriptor() ([]byte, []int)
func (*MapStateListener) GetKey ¶
func (m *MapStateListener) GetKey() string
func (*MapStateListener) GetProposalID ¶
func (m *MapStateListener) GetProposalID() ProposalID
func (*MapStateListener) Marshal ¶
func (m *MapStateListener) Marshal() (dAtA []byte, err error)
func (*MapStateListener) MarshalToSizedBuffer ¶
func (m *MapStateListener) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MapStateListener) ProtoMessage ¶
func (*MapStateListener) ProtoMessage()
func (*MapStateListener) Reset ¶
func (m *MapStateListener) Reset()
func (*MapStateListener) Size ¶
func (m *MapStateListener) Size() (n int)
func (*MapStateListener) String ¶
func (m *MapStateListener) String() string
func (*MapStateListener) Unmarshal ¶
func (m *MapStateListener) Unmarshal(dAtA []byte) error
func (*MapStateListener) XXX_DiscardUnknown ¶
func (m *MapStateListener) XXX_DiscardUnknown()
func (*MapStateListener) XXX_Marshal ¶
func (m *MapStateListener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MapStateListener) XXX_Merge ¶
func (m *MapStateListener) XXX_Merge(src proto.Message)
func (*MapStateListener) XXX_Size ¶
func (m *MapStateListener) XXX_Size() int
func (*MapStateListener) XXX_Unmarshal ¶
func (m *MapStateListener) XXX_Unmarshal(b []byte) error
type MapStateValue ¶
type MapStateValue struct {
Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
Expire *time.Time `protobuf:"bytes,2,opt,name=expire,proto3,stdtime" json:"expire,omitempty"`
}
func (*MapStateValue) Descriptor ¶
func (*MapStateValue) Descriptor() ([]byte, []int)
func (*MapStateValue) GetExpire ¶
func (m *MapStateValue) GetExpire() *time.Time
func (*MapStateValue) GetValue ¶
func (m *MapStateValue) GetValue() []byte
func (*MapStateValue) Marshal ¶
func (m *MapStateValue) Marshal() (dAtA []byte, err error)
func (*MapStateValue) MarshalToSizedBuffer ¶
func (m *MapStateValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MapStateValue) ProtoMessage ¶
func (*MapStateValue) ProtoMessage()
func (*MapStateValue) Reset ¶
func (m *MapStateValue) Reset()
func (*MapStateValue) Size ¶
func (m *MapStateValue) Size() (n int)
func (*MapStateValue) String ¶
func (m *MapStateValue) String() string
func (*MapStateValue) Unmarshal ¶
func (m *MapStateValue) Unmarshal(dAtA []byte) error
func (*MapStateValue) XXX_DiscardUnknown ¶
func (m *MapStateValue) XXX_DiscardUnknown()
func (*MapStateValue) XXX_Marshal ¶
func (m *MapStateValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MapStateValue) XXX_Merge ¶
func (m *MapStateValue) XXX_Merge(src proto.Message)
func (*MapStateValue) XXX_Size ¶
func (m *MapStateValue) XXX_Size() int
func (*MapStateValue) XXX_Unmarshal ¶
func (m *MapStateValue) XXX_Unmarshal(b []byte) error
type NewServiceFunc ¶
type NewServiceFunc func(ServiceContext) Service
type ProposalID ¶
type ProposalID uint64
type Proposals ¶
type Proposals interface {
Size() SizeProposals
Put() PutProposals
Get() GetProposals
Remove() RemoveProposals
Clear() ClearProposals
Events() EventsProposals
Entries() EntriesProposals
}
type PutProposal ¶
type PutProposal interface {
Proposal
Request() *_map.PutRequest
Reply(*_map.PutResponse) error
// contains filtered or unexported methods
}
type PutProposals ¶
type PutProposals interface {
Get(ProposalID) (PutProposal, bool)
List() []PutProposal
// contains filtered or unexported methods
}
type RemoveProposal ¶
type RemoveProposal interface {
Proposal
Request() *_map.RemoveRequest
Reply(*_map.RemoveResponse) error
// contains filtered or unexported methods
}
type RemoveProposals ¶
type RemoveProposals interface {
Get(ProposalID) (RemoveProposal, bool)
List() []RemoveProposal
// contains filtered or unexported methods
}
type Service ¶
type Service interface {
ServiceContext
Backup(SnapshotWriter) error
Restore(SnapshotReader) error
// Size returns the size of the map
Size(SizeProposal) error
// Put puts an entry into the map
Put(PutProposal) error
// Get gets the entry for a key
Get(GetProposal) error
// Remove removes an entry from the map
Remove(RemoveProposal) error
// Clear removes all entries from the map
Clear(ClearProposal) error
// Events listens for change events
Events(EventsProposal) error
// Entries lists all entries in the map
Entries(EntriesProposal) error
}
type ServiceAdaptor ¶
func (*ServiceAdaptor) SessionClosed ¶
func (s *ServiceAdaptor) SessionClosed(session rsm.Session)
func (*ServiceAdaptor) SessionExpired ¶
func (s *ServiceAdaptor) SessionExpired(session rsm.Session)
func (*ServiceAdaptor) SessionOpen ¶
func (s *ServiceAdaptor) SessionOpen(rsmSession rsm.Session)
type ServiceContext ¶
type Session ¶
type Session interface {
ID() SessionID
State() SessionState
Watch(func(SessionState)) Watcher
Proposals() Proposals
// contains filtered or unexported methods
}
type SizeProposal ¶
type SizeProposal interface {
Proposal
Request() *_map.SizeRequest
Reply(*_map.SizeResponse) error
// contains filtered or unexported methods
}
type SizeProposals ¶
type SizeProposals interface {
Get(ProposalID) (SizeProposal, bool)
List() []SizeProposal
// contains filtered or unexported methods
}
type SnapshotReader ¶
type SnapshotWriter ¶
Click to show internal directories.
Click to hide internal directories.