list

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: 14 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
}

type AppendProposals

type AppendProposals interface {
	Get(ProposalID) (AppendProposal, bool)
	List() []AppendProposal
}

type ClearProposal

type ClearProposal interface {
	Proposal
	Request() *list.ClearRequest
}

type ClearProposals

type ClearProposals interface {
	Get(ProposalID) (ClearProposal, bool)
	List() []ClearProposal
}

type ElementsQuery added in v0.9.1

type ElementsQuery interface {
	Query
	Request() *list.ElementsRequest
	Notify(*list.ElementsResponse)
	Close()
}

type EventsProposal

type EventsProposal interface {
	Proposal
	Request() *list.EventsRequest
	Notify(*list.EventsResponse)
	Close()
}

type EventsProposals

type EventsProposals interface {
	Get(ProposalID) (EventsProposal, bool)
	List() []EventsProposal
}

type GetQuery added in v0.9.1

type GetQuery interface {
	Query
	Request() *list.GetRequest
}

type InsertProposal

type InsertProposal interface {
	Proposal
	Request() *list.InsertRequest
}

type InsertProposals

type InsertProposals interface {
	Get(ProposalID) (InsertProposal, bool)
	List() []InsertProposal
}

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
	State() ProposalState
	Watch(func(ProposalState)) Watcher
}

type ProposalID

type ProposalID uint64

type ProposalState added in v0.9.1

type ProposalState int
const (
	ProposalComplete ProposalState = iota
	ProposalOpen
)

type Proposals

type Proposals interface {
	Append() AppendProposals
	Insert() InsertProposals
	Set() SetProposals
	Remove() RemoveProposals
	Clear() ClearProposals
	Events() EventsProposals
}

type Query added in v0.9.1

type Query interface {
	fmt.Stringer
	Session() Session
}

type RemoveProposal

type RemoveProposal interface {
	Proposal
	Request() *list.RemoveRequest
}

type RemoveProposals

type RemoveProposals interface {
	Get(ProposalID) (RemoveProposal, bool)
	List() []RemoveProposal
}

type Service

type Service interface {
	ServiceContext
	Backup(SnapshotWriter) error
	Restore(SnapshotReader) error
	// Size gets the number of elements in the list
	Size(SizeQuery) (*list.SizeResponse, error)
	// Append appends a value to the list
	Append(AppendProposal) (*list.AppendResponse, error)
	// Insert inserts a value at a specific index in the list
	Insert(InsertProposal) (*list.InsertResponse, error)
	// Get gets the value at an index in the list
	Get(GetQuery) (*list.GetResponse, error)
	// Set sets the value at an index in the list
	Set(SetProposal) (*list.SetResponse, error)
	// Remove removes an element from the list
	Remove(RemoveProposal) (*list.RemoveResponse, error)
	// Clear removes all elements from the list
	Clear(ClearProposal) (*list.ClearResponse, error)
	// Events listens for change events
	Events(EventsProposal)
	// Elements streams all elements in the list
	Elements(ElementsQuery)
}

type ServiceAdaptor

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

func (*ServiceAdaptor) Backup

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

func (*ServiceAdaptor) ExecuteCommand added in v0.9.1

func (s *ServiceAdaptor) ExecuteCommand(command rsm.Command)

func (*ServiceAdaptor) ExecuteQuery added in v0.9.1

func (s *ServiceAdaptor) ExecuteQuery(query rsm.Query)

func (*ServiceAdaptor) Restore

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

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
}

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
}

type SetProposal

type SetProposal interface {
	Proposal
	Request() *list.SetRequest
}

type SetProposals

type SetProposals interface {
	Get(ProposalID) (SetProposal, bool)
	List() []SetProposal
}

type SizeQuery added in v0.9.1

type SizeQuery interface {
	Query
	Request() *list.SizeRequest
}

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