discovery

package
v0.0.0-...-159e028 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Lifetime time.Duration // 微服务生存时长
	Interval time.Duration // 微服务注册间隔
}

type Service

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

func NewService

func NewService(endpoints []string, key, val string, options *Options) (*Service, error)

func (*Service) Shutdown

func (s *Service) Shutdown(ctxs ...context.Context) error

func (*Service) Start

func (s *Service) Start(ctxs ...context.Context) error

启动服务

Jump to

Keyboard shortcuts

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