zero

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: AGPL-3.0, Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Oracle

type Oracle struct {
	x.SafeMutex
	// contains filtered or unexported fields
}

func (*Oracle) Init

func (o *Oracle) Init()

type Server

type Server struct {
	x.SafeMutex

	Node *node

	NumReplicas int
	// contains filtered or unexported fields
}

func (*Server) AssignUids

func (s *Server) AssignUids(ctx context.Context, num *intern.Num) (*api.AssignedIds, error)

AssignUids is used to assign new uids by communicating with the leader of the RAFT group responsible for handing out uids.

func (*Server) CommitOrAbort

func (s *Server) CommitOrAbort(ctx context.Context, src *api.TxnContext) (*api.TxnContext, error)

func (*Server) Connect

func (s *Server) Connect(ctx context.Context,
	m *intern.Member) (resp *intern.ConnectionState, err error)

Connect is used to connect the very first time with group zero.

func (*Server) Init

func (s *Server) Init()

func (*Server) KnownGroups added in v0.9.1

func (s *Server) KnownGroups() []uint32

func (*Server) Leader

func (s *Server) Leader(gid uint32) *conn.Pool

func (*Server) MarshalMembershipState

func (s *Server) MarshalMembershipState() ([]byte, error)

func (*Server) Oracle

func (s *Server) Oracle(unused *api.Payload, server intern.Zero_OracleServer) error

func (*Server) ServingTablet

func (s *Server) ServingTablet(tablet string) *intern.Tablet

ServingTablet returns the Tablet called tablet.

func (*Server) SetMembershipState

func (s *Server) SetMembershipState(state *intern.MembershipState)

func (*Server) ShouldServe

func (s *Server) ShouldServe(
	ctx context.Context, tablet *intern.Tablet) (resp *intern.Tablet, err error)

func (*Server) SyncedUntil added in v0.9.1

func (s *Server) SyncedUntil() uint64

func (*Server) Timestamps

func (s *Server) Timestamps(ctx context.Context, num *intern.Num) (*api.AssignedIds, error)

Timestamps is used to assign startTs for a new transaction

func (*Server) TryAbort

func (s *Server) TryAbort(ctx context.Context, txns *intern.TxnTimestamps) (*intern.TxnTimestamps, error)

func (*Server) Update

func (s *Server) Update(stream intern.Zero_UpdateServer) error

Jump to

Keyboard shortcuts

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