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 EventsProposal
- type EventsProposals
- type GetProposal
- type GetProposals
- type NewServiceFunc
- type Proposal
- type ProposalID
- type Proposals
- type Service
- type ServiceAdaptor
- type ServiceContext
- type Session
- type SessionID
- type SessionState
- type Sessions
- type SetProposal
- type SetProposals
- type SnapshotReader
- type SnapshotWriter
- type ValueState
- func (*ValueState) Descriptor() ([]byte, []int)
- func (m *ValueState) GetValue() []byte
- func (m *ValueState) Marshal() (dAtA []byte, err error)
- func (m *ValueState) MarshalTo(dAtA []byte) (int, error)
- func (m *ValueState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValueState) ProtoMessage()
- func (m *ValueState) Reset()
- func (m *ValueState) Size() (n int)
- func (m *ValueState) String() string
- func (m *ValueState) Unmarshal(dAtA []byte) error
- func (m *ValueState) XXX_DiscardUnknown()
- func (m *ValueState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValueState) XXX_Merge(src proto.Message)
- func (m *ValueState) XXX_Size() int
- func (m *ValueState) XXX_Unmarshal(b []byte) error
- type Watcher
Constants ¶
View Source
const Type = "Value"
Variables ¶
Functions ¶
func RegisterService ¶
RegisterService registers the election primitive service on the given node
Types ¶
type EventsProposal ¶
type EventsProposal interface { Proposal Request() *value.EventsRequest Notify(*value.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() *value.GetRequest Reply(*value.GetResponse) error // contains filtered or unexported methods }
type GetProposals ¶
type GetProposals interface { Get(ProposalID) (GetProposal, bool) List() []GetProposal // contains filtered or unexported methods }
type NewServiceFunc ¶
type NewServiceFunc func(ServiceContext) Service
type ProposalID ¶
type ProposalID uint64
type Proposals ¶
type Proposals interface { Set() SetProposals Get() GetProposals Events() EventsProposals }
type Service ¶
type Service interface { ServiceContext Backup(SnapshotWriter) error Restore(SnapshotReader) error // Set sets the value Set(SetProposal) error // Get gets the value Get(GetProposal) error // Events listens for value change events Events(EventsProposal) 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 SetProposal ¶
type SetProposal interface { Proposal Request() *value.SetRequest Reply(*value.SetResponse) error // contains filtered or unexported methods }
type SetProposals ¶
type SetProposals interface { Get(ProposalID) (SetProposal, bool) List() []SetProposal // contains filtered or unexported methods }
type SnapshotReader ¶
type SnapshotReader interface {
ReadState() (*ValueState, error)
}
type SnapshotWriter ¶
type SnapshotWriter interface {
WriteState(*ValueState) error
}
type ValueState ¶
type ValueState struct { meta.ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*ValueState) Descriptor ¶
func (*ValueState) Descriptor() ([]byte, []int)
func (*ValueState) GetValue ¶
func (m *ValueState) GetValue() []byte
func (*ValueState) Marshal ¶
func (m *ValueState) Marshal() (dAtA []byte, err error)
func (*ValueState) MarshalToSizedBuffer ¶
func (m *ValueState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValueState) ProtoMessage ¶
func (*ValueState) ProtoMessage()
func (*ValueState) Reset ¶
func (m *ValueState) Reset()
func (*ValueState) Size ¶
func (m *ValueState) Size() (n int)
func (*ValueState) String ¶
func (m *ValueState) String() string
func (*ValueState) Unmarshal ¶
func (m *ValueState) Unmarshal(dAtA []byte) error
func (*ValueState) XXX_DiscardUnknown ¶
func (m *ValueState) XXX_DiscardUnknown()
func (*ValueState) XXX_Marshal ¶
func (m *ValueState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValueState) XXX_Merge ¶
func (m *ValueState) XXX_Merge(src proto.Message)
func (*ValueState) XXX_Size ¶
func (m *ValueState) XXX_Size() int
func (*ValueState) XXX_Unmarshal ¶
func (m *ValueState) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.