server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 24 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) 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) GetProcedureFactory added in v0.4.0

func (srv *Server) GetProcedureFactory() *coordinator.Factory

func (*Server) GetProcedureManager added in v0.4.0

func (srv *Server) GetProcedureManager() procedure.Manager

func (*Server) IsClosed

func (srv *Server) IsClosed() bool

func (*Server) Run

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

Run runs the services and background jobs.

Jump to

Keyboard shortcuts

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