server

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a Piko server node.

func NewServer

func NewServer(conf *config.Config, logger log.Logger) (*Server, error)

NewServer creates a server node with the given configuration.

This loads the server configuration and open the server TCP listens, though won't start accepting traffic.

func (*Server) ClusterState added in v0.6.0

func (s *Server) ClusterState() *cluster.State

func (*Server) Config added in v0.6.0

func (s *Server) Config() *config.Config

func (*Server) Shutdown added in v0.6.0

func (s *Server) Shutdown()

Shutdown gracefully stops the server node.

func (*Server) Start added in v0.6.0

func (s *Server) Start() error

Start starts the Piko node.

func (*Server) Wait added in v0.6.0

func (s *Server) Wait(ctx context.Context) bool

Wait waits for the server to be shutdown, either due to the given context being cancelled or a fatal error in the server. Returns whether the server exited due to being gracefully shutdown or a fatal error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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