server

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 25 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")
	ErrFlowLimiterNotFound = coderr.NewCodeError(coderr.Internal, "flow limiter not found")
)

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) GetFlowLimiter added in v1.2.1

func (srv *Server) GetFlowLimiter() (*limiter.FlowLimiter, error)

func (*Server) GetLeader

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

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