service

package
v0.0.0-...-c328704 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServiceExist = errors.New("service name exist")
)

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	HTTP struct {
		Is   bool   `json:",omitempty"`
		Host string `json:",omitempty"`
	} `json:",omitempty"`
}

type Router

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

func NewRouter

func NewRouter() *Router

func (*Router) Add

func (r *Router) Add(name string, openFn func() (net.Conn, error),
	closeFn func() error) bool

func (*Router) All

func (r *Router) All() []*Service

func (*Router) Get

func (r *Router) Get(name string) *Service

func (*Router) Prepare

func (r *Router) Prepare(name string) error

func (*Router) Remove

func (r *Router) Remove(name string)

type SafedAttribute

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

func NewSafedAttribute

func NewSafedAttribute(attr *Attribute) *SafedAttribute

func (*SafedAttribute) Update

func (safed *SafedAttribute) Update(fn func(attr *Attribute) error) error

func (*SafedAttribute) View

func (safed *SafedAttribute) View(fn func(attr Attribute) error) error

type Service

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

func (*Service) Attribute

func (s *Service) Attribute() *SafedAttribute

func (*Service) Close

func (s *Service) Close() error

func (*Service) Name

func (s *Service) Name() string

func (*Service) Open

func (s *Service) Open() (net.Conn, error)

Jump to

Keyboard shortcuts

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