server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCreateEtcdClient = coderr.NewCodeError(coderr.Internal, "create etcd etcdCli")
	ErrStartEtcd        = coderr.NewCodeError(coderr.Internal, "start embed etcd")
	ErrStartEtcdTimeout = coderr.NewCodeError(coderr.Internal, "start etcd server timeout")
	ErrStartServer      = coderr.NewCodeError(coderr.Internal, "start server")
)

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func CreateServer

func CreateServer(cfg *config.Config) (*Server, error)

CreateServer creates the server instance without starting any services or background jobs.

func (*Server) BindHeartbeatStream

func (srv *Server) BindHeartbeatStream(_ context.Context, node string, sender grpcservice.HeartbeatStreamSender) error

func (*Server) Close

func (srv *Server) Close()

func (*Server) GetClusterManager

func (srv *Server) GetClusterManager() cluster.Manager

func (*Server) GetLeader

func (srv *Server) GetLeader(ctx context.Context) (*member.GetLeaderResp, error)

func (*Server) IsClosed

func (srv *Server) IsClosed() bool

func (*Server) ProcessHeartbeat

func (srv *Server) ProcessHeartbeat(ctx context.Context, req *metaservicepb.NodeHeartbeatRequest) error

func (*Server) Run

func (srv *Server) Run(ctx context.Context) error

Run runs the services and background jobs.

func (*Server) UnbindHeartbeatStream

func (srv *Server) UnbindHeartbeatStream(_ context.Context, node string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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