server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 9 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Manage = New()

Manage server

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Add(...Runnable)
	Start(context.Context) error
}

Manager server manage

func New

func New(opts ...Option) Manager

New 实例化

type Option

type Option func(*Options)

Option set Options

type Options

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

Options options

type Runnable

type Runnable interface {
	fmt.Stringer
	// Start 启动
	Start(ctx context.Context) error
}

Runnable runnable

type Server

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

Server server

func (*Server) Add

func (e *Server) Add(r ...Runnable)

Add runnable

func (*Server) Start

func (e *Server) Start(ctx context.Context) (err error)

Start runnable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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