server

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Manage = New()

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

func (*Server) Start

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

Start start runnable

Jump to

Keyboard shortcuts

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