server

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 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
}

func New

func New(opts ...Option) Manager

New 实例化

type Option

type Option func(*options)

type Runnable

type Runnable interface {
	fmt.Stringer
	// Start 启动
	Start(ctx context.Context) error
	// Attempt 是否允许启动
	Attempt() bool
}

type Server

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

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