zero

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 License: AGPL-3.0, Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZeroCmd = &cobra.Command{
	Use:   "zero",
	Short: "Run Dgraph zero server",
	Long: `
A Dgraph zero instance manages the Dgraph cluster.  Typically, a single Zero
instance is sufficient for the cluster; however, one can run multiple Zero
instances to achieve high-availability.
`,
	Run: func(cmd *cobra.Command, args []string) {
		run()
	},
}

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 *protos.Num) (*protos.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 *protos.TxnContext) (*protos.TxnContext, error)

func (*Server) Connect

func (s *Server) Connect(ctx context.Context,
	m *protos.Member) (resp *protos.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 *protos.Payload, server protos.Zero_OracleServer) error

func (*Server) ServingTablet

func (s *Server) ServingTablet(dst string) *protos.Tablet

func (*Server) SetMembershipState

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

func (*Server) ShouldServe

func (s *Server) ShouldServe(
	ctx context.Context, tablet *protos.Tablet) (resp *protos.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 *protos.Num) (*protos.AssignedIds, error)

Timestamps is used to assign startTs for a new transaction

func (*Server) TryAbort

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

func (*Server) Update

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

Jump to

Keyboard shortcuts

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