Documentation ¶
Index ¶
- Variables
- type Oracle
- type Server
- func (s *Server) AssignUids(ctx context.Context, num *protos.Num) (*protos.AssignedIds, error)
- func (s *Server) CommitOrAbort(ctx context.Context, src *protos.TxnContext) (*protos.TxnContext, error)
- func (s *Server) Connect(ctx context.Context, m *protos.Member) (resp *protos.ConnectionState, err error)
- func (s *Server) Init()
- func (s *Server) Leader(gid uint32) *conn.Pool
- func (s *Server) MarshalMembershipState() ([]byte, error)
- func (s *Server) Oracle(unused *protos.Payload, server protos.Zero_OracleServer) error
- func (s *Server) ServingTablet(dst string) *protos.Tablet
- func (s *Server) SetMembershipState(state *protos.MembershipState)
- func (s *Server) ShouldServe(ctx context.Context, tablet *protos.Tablet) (resp *protos.Tablet, err error)
- func (s *Server) Timestamps(ctx context.Context, num *protos.Num) (*protos.AssignedIds, error)
- func (s *Server) TryAbort(ctx context.Context, txns *protos.TxnTimestamps) (*protos.TxnTimestamps, error)
- func (s *Server) Update(stream protos.Zero_UpdateServer) error
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 Server ¶
type Server struct { x.SafeMutex Node *node NumReplicas int // contains filtered or unexported fields }
func (*Server) AssignUids ¶
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) MarshalMembershipState ¶
func (*Server) SetMembershipState ¶
func (s *Server) SetMembershipState(state *protos.MembershipState)
func (*Server) ShouldServe ¶
func (*Server) Timestamps ¶
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)
Click to show internal directories.
Click to hide internal directories.