serv

package
v0.0.0-...-b4faadb Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandPing = 100
	CommandPong = 101
)

command of message

Variables

This section is empty.

Functions

func NewServerStartCmd

func NewServerStartCmd(ctx context.Context, version string) *cobra.Command

NewServerStartCmd creates a new http server command

func RunServerStart

func RunServerStart(ctx context.Context, opts *ServerStartOptions, version string) error

RunServerStart run http server

Types

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Server is a websocket implement of the Server

func NewServer

func NewServer(id, address string) *Server

NewServer NewServer

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown Shutdown

func (*Server) Start

func (s *Server) Start() error

Start server

type ServerOptions

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

ServerOptions ServerOptions

type ServerStartOptions

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

ServerStartOptions ServerStartOptions

Jump to

Keyboard shortcuts

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