list

package
v0.6.17 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Overview

Code generated by atomix-go-framework. DO NOT EDIT.

Code generated by atomix-go-framework. DO NOT EDIT.

Index

Constants

View Source
const Type = "List"

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 RegisterService

func RegisterService(node *rsm.Node)

RegisterService registers the election primitive service on the given node

Types

type AppendProposal

type AppendProposal interface {
	Proposal
	Request() *list.AppendRequest
	Reply(*list.AppendResponse) error
	// contains filtered or unexported methods
}

type AppendProposals

type AppendProposals interface {
	Get(ProposalID) (AppendProposal, bool)
	List() []AppendProposal
	// contains filtered or unexported methods
}

type ClearProposal

type ClearProposal interface {
	Proposal
	Request() *list.ClearRequest
	Reply(*list.ClearResponse) error
	// contains filtered or unexported methods
}

type ClearProposals

type ClearProposals interface {
	Get(ProposalID) (ClearProposal, bool)
	List() []ClearProposal
	// contains filtered or unexported methods
}

type ElementsProposal

type ElementsProposal interface {
	Proposal
	Request() *list.ElementsRequest
	Notify(*list.ElementsResponse) error
	Close() error
}

type ElementsProposals

type ElementsProposals interface {
	Get(ProposalID) (ElementsProposal, bool)
	List() []ElementsProposal
	// contains filtered or unexported methods
}

type EventsProposal

type EventsProposal interface {
	Proposal
	Request() *list.EventsRequest
	Notify(*list.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() *list.GetRequest
	Reply(*list.GetResponse) error
	// contains filtered or unexported methods
}

type GetProposals

type GetProposals interface {
	Get(ProposalID) (GetProposal, bool)
	List() []GetProposal
	// contains filtered or unexported methods
}

type InsertProposal

type InsertProposal interface {
	Proposal
	Request() *list.InsertRequest
	Reply(*list.InsertResponse) error
	// contains filtered or unexported methods
}

type InsertProposals

type InsertProposals interface {
	Get(ProposalID) (InsertProposal, bool)
	List() []InsertProposal
	// contains filtered or unexported methods
}

type ListState

type ListState struct {
	Values []ListValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values"`
}

func (*ListState) Descriptor

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

func (*ListState) GetValues

func (m *ListState) GetValues() []ListValue

func (*ListState) Marshal

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

func (*ListState) MarshalTo

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

func (*ListState) MarshalToSizedBuffer

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

func (*ListState) ProtoMessage

func (*ListState) ProtoMessage()

func (*ListState) Reset

func (m *ListState) Reset()

func (*ListState) Size

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

func (*ListState) String

func (m *ListState) String() string

func (*ListState) Unmarshal

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

func (*ListState) XXX_DiscardUnknown

func (m *ListState) XXX_DiscardUnknown()

func (*ListState) XXX_Marshal

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

func (*ListState) XXX_Merge

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

func (*ListState) XXX_Size

func (m *ListState) XXX_Size() int

func (*ListState) XXX_Unmarshal

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

type ListValue

type ListValue struct {
	meta.ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"`
	Value           string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*ListValue) Descriptor

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

func (*ListValue) GetValue

func (m *ListValue) GetValue() string

func (*ListValue) Marshal

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

func (*ListValue) MarshalTo

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

func (*ListValue) MarshalToSizedBuffer

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

func (*ListValue) ProtoMessage

func (*ListValue) ProtoMessage()

func (*ListValue) Reset

func (m *ListValue) Reset()

func (*ListValue) Size

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

func (*ListValue) String

func (m *ListValue) String() string

func (*ListValue) Unmarshal

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

func (*ListValue) XXX_DiscardUnknown

func (m *ListValue) XXX_DiscardUnknown()

func (*ListValue) XXX_Marshal

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

func (*ListValue) XXX_Merge

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

func (*ListValue) XXX_Size

func (m *ListValue) XXX_Size() int

func (*ListValue) XXX_Unmarshal

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

type NewServiceFunc

type NewServiceFunc func(ServiceContext) Service

type Proposal

type Proposal interface {
	fmt.Stringer
	ID() ProposalID
	Session() Session
}

type ProposalID

type ProposalID uint64

type Proposals

type Proposals interface {
	Size() SizeProposals
	Append() AppendProposals
	Insert() InsertProposals
	Get() GetProposals
	Set() SetProposals
	Remove() RemoveProposals
	Clear() ClearProposals
	Events() EventsProposals
	Elements() ElementsProposals
}

type RemoveProposal

type RemoveProposal interface {
	Proposal
	Request() *list.RemoveRequest
	Reply(*list.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 gets the number of elements in the list
	Size(SizeProposal) error
	// Append appends a value to the list
	Append(AppendProposal) error
	// Insert inserts a value at a specific index in the list
	Insert(InsertProposal) error
	// Get gets the value at an index in the list
	Get(GetProposal) error
	// Set sets the value at an index in the list
	Set(SetProposal) error
	// Remove removes an element from the list
	Remove(RemoveProposal) error
	// Clear removes all elements from the list
	Clear(ClearProposal) error
	// Events listens for change events
	Events(EventsProposal) error
	// Elements streams all elements in the list
	Elements(ElementsProposal) error
}

type ServiceAdaptor

type ServiceAdaptor struct {
	rsm.Service
	// contains filtered or unexported fields
}

func (*ServiceAdaptor) Backup

func (s *ServiceAdaptor) Backup(writer io.Writer) error

func (*ServiceAdaptor) Restore

func (s *ServiceAdaptor) Restore(reader io.Reader) error

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 ServiceContext interface {
	Scheduler() rsm.Scheduler
	Sessions() Sessions
	Proposals() Proposals
}

type Session

type Session interface {
	ID() SessionID
	State() SessionState

	Watch(func(SessionState)) Watcher
	Proposals() Proposals
	// contains filtered or unexported methods
}

type SessionID

type SessionID uint64

type SessionState

type SessionState int
const (
	SessionClosed SessionState = iota
	SessionOpen
)

type Sessions

type Sessions interface {
	Get(SessionID) (Session, bool)
	List() []Session
	// contains filtered or unexported methods
}

type SetProposal

type SetProposal interface {
	Proposal
	Request() *list.SetRequest
	Reply(*list.SetResponse) error
	// contains filtered or unexported methods
}

type SetProposals

type SetProposals interface {
	Get(ProposalID) (SetProposal, bool)
	List() []SetProposal
	// contains filtered or unexported methods
}

type SizeProposal

type SizeProposal interface {
	Proposal
	Request() *list.SizeRequest
	Reply(*list.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 SnapshotReader interface {
	ReadState() (*ListState, error)
}

type SnapshotWriter

type SnapshotWriter interface {
	WriteState(*ListState) error
}

type Watcher

type Watcher interface {
	Cancel()
}

Jump to

Keyboard shortcuts

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