discovery

package
v0.0.0-...-59a64bd Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MinPort AFAIRE
	MinPort = 65000
	// MaxPort AFAIRE
	MaxPort = 65534
)

Variables

This section is empty.

Functions

func GetFreePort

func GetFreePort(used []int) (int, error)

GetFreePort AFAIRE

Types

type DBFiles

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

DBFiles AFAIRE

func NewDBFiles

func NewDBFiles(cbAlert func(error)) (*DBFiles, error)

NewDBFiles AFAIRE

func (*DBFiles) AssignPortToService

func (db *DBFiles) AssignPortToService(name, id, version string) (int, error)

AssignPortToService AFAIRE

func (*DBFiles) DeleteService

func (db *DBFiles) DeleteService(name, id string) error

DeleteService AFAIRE

func (*DBFiles) GetAllServices

func (db *DBFiles) GetAllServices() ([]Service, error)

GetAllServices AFAIRE

func (*DBFiles) RegisterService

func (db *DBFiles) RegisterService(name, id, version string, port int) error

RegisterService AFAIRE

type Discovery

type Discovery interface {
	// AFAIRE
	AssignPortToService(name, id, version string) (int, error)
	// AFAIRE
	RegisterService(name, id, version string, port int) error
	// AFAIRE
	GetAllServices() ([]Service, error)
	// AFAIRE
	DeleteService(name, id string) error
}

Discovery AFAIRE

type Service

type Service struct {
	Name      string
	ID        string
	Version   string
	Port      int
	Status    string
	StartedAt int64
}

Service AFAIRE

func NewRunningService

func NewRunningService(name, id, version string, port int) *Service

NewRunningService AFAIRE

func NewService

func NewService(name, id, version, status string, port int) *Service

NewService AFAIRE

func NewStartingService

func NewStartingService(name, id, version string, port int) *Service

NewStartingService AFAIRE

Jump to

Keyboard shortcuts

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