_map

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: 22 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 = "Map"

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, ch chan<- MapEntry) error
	Repair(ctx context.Context, state *MapEntry) (*MapEntry, error)
	Advertise(ctx context.Context, state *MapEntry) error
	Update(ctx context.Context, state *MapEntry) 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, key string) (*MapEntry, error)
	List(ctx context.Context, ch chan<- MapEntry) error
	Update(ctx context.Context, entry *MapEntry) 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 MapEntry

type MapEntry struct {
	Key   MapKey    `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
	Value *MapValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*MapEntry) Descriptor

func (*MapEntry) Descriptor() ([]byte, []int)

func (*MapEntry) GetKey

func (m *MapEntry) GetKey() MapKey

func (*MapEntry) GetValue

func (m *MapEntry) GetValue() *MapValue

func (*MapEntry) Marshal

func (m *MapEntry) Marshal() (dAtA []byte, err error)

func (*MapEntry) MarshalTo

func (m *MapEntry) MarshalTo(dAtA []byte) (int, error)

func (*MapEntry) MarshalToSizedBuffer

func (m *MapEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MapEntry) ProtoMessage

func (*MapEntry) ProtoMessage()

func (*MapEntry) Reset

func (m *MapEntry) Reset()

func (*MapEntry) Size

func (m *MapEntry) Size() (n int)

func (*MapEntry) String

func (m *MapEntry) String() string

func (*MapEntry) Unmarshal

func (m *MapEntry) Unmarshal(dAtA []byte) error

func (*MapEntry) XXX_DiscardUnknown

func (m *MapEntry) XXX_DiscardUnknown()

func (*MapEntry) XXX_Marshal

func (m *MapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapEntry) XXX_Merge

func (m *MapEntry) XXX_Merge(src proto.Message)

func (*MapEntry) XXX_Size

func (m *MapEntry) XXX_Size() int

func (*MapEntry) XXX_Unmarshal

func (m *MapEntry) XXX_Unmarshal(b []byte) error

type MapKey

type MapKey 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 (*MapKey) Descriptor

func (*MapKey) Descriptor() ([]byte, []int)

func (*MapKey) GetKey

func (m *MapKey) GetKey() string

func (*MapKey) Marshal

func (m *MapKey) Marshal() (dAtA []byte, err error)

func (*MapKey) MarshalTo

func (m *MapKey) MarshalTo(dAtA []byte) (int, error)

func (*MapKey) MarshalToSizedBuffer

func (m *MapKey) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MapKey) ProtoMessage

func (*MapKey) ProtoMessage()

func (*MapKey) Reset

func (m *MapKey) Reset()

func (*MapKey) Size

func (m *MapKey) Size() (n int)

func (*MapKey) String

func (m *MapKey) String() string

func (*MapKey) Unmarshal

func (m *MapKey) Unmarshal(dAtA []byte) error

func (*MapKey) XXX_DiscardUnknown

func (m *MapKey) XXX_DiscardUnknown()

func (*MapKey) XXX_Marshal

func (m *MapKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapKey) XXX_Merge

func (m *MapKey) XXX_Merge(src proto.Message)

func (*MapKey) XXX_Size

func (m *MapKey) XXX_Size() int

func (*MapKey) XXX_Unmarshal

func (m *MapKey) XXX_Unmarshal(b []byte) error

type MapValue

type MapValue struct {
	Value []byte         `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	TTL   *time.Duration `protobuf:"bytes,2,opt,name=ttl,proto3,stdduration" json:"ttl,omitempty"`
}

func (*MapValue) Descriptor

func (*MapValue) Descriptor() ([]byte, []int)

func (*MapValue) GetTTL

func (m *MapValue) GetTTL() *time.Duration

func (*MapValue) GetValue

func (m *MapValue) GetValue() []byte

func (*MapValue) Marshal

func (m *MapValue) Marshal() (dAtA []byte, err error)

func (*MapValue) MarshalTo

func (m *MapValue) MarshalTo(dAtA []byte) (int, error)

func (*MapValue) MarshalToSizedBuffer

func (m *MapValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MapValue) ProtoMessage

func (*MapValue) ProtoMessage()

func (*MapValue) Reset

func (m *MapValue) Reset()

func (*MapValue) Size

func (m *MapValue) Size() (n int)

func (*MapValue) String

func (m *MapValue) String() string

func (*MapValue) Unmarshal

func (m *MapValue) Unmarshal(dAtA []byte) error

func (*MapValue) XXX_DiscardUnknown

func (m *MapValue) XXX_DiscardUnknown()

func (*MapValue) XXX_Marshal

func (m *MapValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapValue) XXX_Merge

func (m *MapValue) XXX_Merge(src proto.Message)

func (*MapValue) XXX_Size

func (m *MapValue) XXX_Size() int

func (*MapValue) XXX_Unmarshal

func (m *MapValue) XXX_Unmarshal(b []byte) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Clear

func (s *Server) Clear(ctx context.Context, request *_map.ClearRequest) (*_map.ClearResponse, error)

func (*Server) Entries

func (s *Server) Entries(request *_map.EntriesRequest, srv _map.MapService_EntriesServer) error

func (*Server) Events

func (s *Server) Events(request *_map.EventsRequest, srv _map.MapService_EventsServer) error

func (*Server) Get

func (s *Server) Get(ctx context.Context, request *_map.GetRequest) (*_map.GetResponse, error)

func (*Server) Put

func (s *Server) Put(ctx context.Context, request *_map.PutRequest) (*_map.PutResponse, error)

func (*Server) Remove

func (s *Server) Remove(ctx context.Context, request *_map.RemoveRequest) (*_map.RemoveResponse, error)

func (*Server) Size

func (s *Server) Size(ctx context.Context, request *_map.SizeRequest) (*_map.SizeResponse, error)

type Service

type Service interface {
	gossip.Service
	Protocol() GossipProtocol
	// Size returns the size of the map
	Size(context.Context, *_map.SizeRequest) (*_map.SizeResponse, error)
	// Put puts an entry into the map
	Put(context.Context, *_map.PutRequest) (*_map.PutResponse, error)
	// Get gets the entry for a key
	Get(context.Context, *_map.GetRequest) (*_map.GetResponse, error)
	// Remove removes an entry from the map
	Remove(context.Context, *_map.RemoveRequest) (*_map.RemoveResponse, error)
	// Clear removes all entries from the map
	Clear(context.Context, *_map.ClearRequest) (*_map.ClearResponse, error)
	// Events listens for change events
	Events(context.Context, *_map.EventsRequest, chan<- _map.EventsResponse) error
	// Entries lists all entries in the map
	Entries(context.Context, *_map.EntriesRequest, chan<- _map.EntriesResponse) error
}

Jump to

Keyboard shortcuts

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