Documentation ¶
Overview ¶
Code generated by atomix-go-framework. DO NOT EDIT.
Code generated by atomix-go-framework. DO NOT EDIT.
Code generated by atomix-go-framework. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func RegisterServer(node *gossip.Node)
- func RegisterService(node *gossip.Node)
- type GossipClient
- type GossipEngine
- type GossipGroup
- type GossipHandler
- type GossipMember
- type GossipMemberID
- type GossipProtocol
- type GossipServer
- type Server
- type Service
- 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
Constants ¶
View Source
const ServiceType gossip.ServiceType = "Value"
Variables ¶
Functions ¶
func RegisterServer ¶
RegisterServer registers the primitive on the given node
func RegisterService ¶
RegisterService registers the service on the given node
Types ¶
type GossipClient ¶
type GossipClient interface { Bootstrap(ctx context.Context) (*ValueState, error) Repair(ctx context.Context, state *ValueState) (*ValueState, error) Advertise(ctx context.Context, state *ValueState) error Update(ctx context.Context, state *ValueState) error }
type GossipEngine ¶
type GossipEngine interface {
// contains filtered or unexported methods
}
type GossipGroup ¶
type GossipGroup interface { GossipClient MemberID() GossipMemberID Members() []GossipMember Member(GossipMemberID) GossipMember }
type GossipHandler ¶
type GossipHandler interface { Read(ctx context.Context) (*ValueState, error) Update(ctx context.Context, state *ValueState) error }
type GossipMember ¶
type GossipMember interface { GossipClient ID() GossipMemberID Client() *gossip.Peer }
type GossipMemberID ¶
func (GossipMemberID) String ¶
func (i GossipMemberID) String() string
type GossipProtocol ¶
type GossipProtocol interface { Clock() atime.Clock Group() GossipGroup Server() GossipServer }
type GossipServer ¶
type GossipServer interface { Register(GossipHandler) error // contains filtered or unexported methods }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Events ¶
func (s *Server) Events(request *value.EventsRequest, srv value.ValueService_EventsServer) error
func (*Server) Get ¶
func (s *Server) Get(ctx context.Context, request *value.GetRequest) (*value.GetResponse, error)
func (*Server) Set ¶
func (s *Server) Set(ctx context.Context, request *value.SetRequest) (*value.SetResponse, error)
type Service ¶
type Service interface { gossip.Service Protocol() GossipProtocol // Set sets the value Set(context.Context, *value.SetRequest) (*value.SetResponse, error) // Get gets the value Get(context.Context, *value.GetRequest) (*value.GetResponse, error) // Events listens for value change events Events(context.Context, *value.EventsRequest, chan<- value.EventsResponse) 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.