service

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServicePort = fmt.Errorf("service port <= 0")
)

Functions

This section is empty.

Types

type Check

type Check interface {
	Set(o *Options)
	Exec(reg *api.AgentServiceRegistration)
}

type CheckTcp added in v1.2.4

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

func (*CheckTcp) Exec added in v1.2.4

func (c *CheckTcp) Exec(reg *api.AgentServiceRegistration)

func (*CheckTcp) Set added in v1.2.4

func (c *CheckTcp) Set(o *Options)

type CheckWithNoServer

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

func (*CheckWithNoServer) Exec

func (*CheckWithNoServer) Set added in v1.2.4

func (c *CheckWithNoServer) Set(o *Options)

type Options

type Options struct {
	Name         string
	Host         string
	Port         int
	ConsulConfig *api.Config
	Check        Check
	RunType      RunType
}

func NewOptions

func NewOptions() *Options

func (*Options) CheckTcp added in v1.2.4

func (o *Options) CheckTcp()

func (*Options) CheckWithNoServer

func (o *Options) CheckWithNoServer()

func (*Options) SetCheck added in v1.2.4

func (o *Options) SetCheck(check Check)

type RunType

type RunType int
const (
	RunModelNormal RunType = iota
	RunModelSingle
)

type Service

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

func NewService

func NewService(options *Options) (s *Service, err error)

func (*Service) Close

func (s *Service) Close() error

Jump to

Keyboard shortcuts

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