server

package
v0.0.0-...-f61a1b2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager server manager

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 add runnable

func (*Server) Start

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

Start start runnable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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