serv

package
v0.0.0-...-93c743e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandPing = 100 + iota
	CommandPong
)

服务端处理ping消息

Variables

This section is empty.

Functions

func NewServerStartCmd

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

func RunServerStart

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

Types

type Server

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

func NewServer

func NewServer(id, address string) *Server

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) Start

func (s *Server) Start() error

type ServerOptions

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

ServerOptions ServerOptions

type ServerStartOptions

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

Jump to

Keyboard shortcuts

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