value

package
v0.10.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 21 Imported by: 1

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

View Source
const ServiceType gossip.ServiceType = "Value"

Variables

View Source
var (
	ErrInvalidLengthState        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowState          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterServer

func RegisterServer(node *gossip.Node)

RegisterServer registers the primitive on the given node

func RegisterService

func RegisterService(node *gossip.Node)

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

type GossipMemberID gossip.PeerID

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 (*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) MarshalTo

func (m *ValueState) MarshalTo(dAtA []byte) (int, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL