service

package
v1.1.31 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SupportPackageIsVersion1 = 1

Variables

This section is empty.

Functions

func BuffSize

func BuffSize(buffSize int) opt.Options

func Codec

func Codec(contentType string, c codec.Codec) opt.Options

func ConfigOption

func ConfigOption(opts ...config.Options) opt.Options

func ConnectTimeout

func ConnectTimeout(timeout time.Duration) opt.Options

func Cors added in v1.0.9

func Cors(m *cors.Options) opt.Options

func Endpoint deprecated

func Endpoint(e *endpoint.Endpoint) opt.Options

Deprecated: newServer will created endpoint

func Error

func Error(err parcel.ErrorPackager) opt.Options

func EtcdConfig

func EtcdConfig(e *clientv3.Config) opt.Options

EtcdConfig setting global etcd config first

func Exit

func Exit(exit ...func()) opt.Options

func HttpAddress

func HttpAddress(address string) opt.Options

func Id

func Id(id string) opt.Options

func KeepaliveInterval

func KeepaliveInterval(keepaliveInterval time.Duration) opt.Options

func KeepaliveLifetime

func KeepaliveLifetime(keepaliveLifetime time.Duration) opt.Options

func Namespace

func Namespace(name string) opt.Options

func Port

func Port(port [2]int) opt.Options

Port port[0]:min port[1]:max

func Registry

func Registry(r registry.Registry) opt.Options

func Release added in v1.1.1

func Release()

func Signal

func Signal(signal ...os.Signal) opt.Options

func TCPAddress

func TCPAddress(address string) opt.Options

func Version

func Version(version string) opt.Options

func WatchDog added in v1.1.11

func WatchDog(wrappers ...handler.DogHandler) opt.Options

func Wrapper

func Wrapper(wrappers ...handler.WrapperHandler) opt.Options

func WssAddress

func WssAddress(address, path string) opt.Options

Types

type Service

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

func New

func New(opts ...opt.Options) *Service

func (*Service) Client

func (s *Service) Client() *client.Client

func (*Service) Close

func (s *Service) Close()

func (*Service) Run

func (s *Service) Run()

func (*Service) Server

func (s *Service) Server() *server.Server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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