listener

package
v0.0.0-...-be8c276 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(name string, opts ...Option) server.Runnable

New 实例化

Types

type Option

type Option func(*options)

Option 参数设置类型

func WithAddr

func WithAddr(s string) Option

WithAddr 设置addr

func WithCert

func WithCert(s string) Option

WithCert 设置cert

func WithHandler

func WithHandler(handler http.Handler) Option

WithHandler 设置handler

func WithKey

func WithKey(s string) Option

WithKey 设置key

type Server

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

func (*Server) Attempt

func (s *Server) Attempt() bool

Attempt 判断是否可以启动

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown 停止

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start 开始

func (*Server) String

func (s *Server) String() string

Jump to

Keyboard shortcuts

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