internal

package
v0.0.0-...-27e752d Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartAPI

func StartAPI(address string, services ServiceStore, html bool) *http.Server

Types

type BoltDBServiceStore

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

func NewBoltDBServiceStore

func NewBoltDBServiceStore(path string) (*BoltDBServiceStore, error)

func (*BoltDBServiceStore) Close

func (s *BoltDBServiceStore) Close() error

func (*BoltDBServiceStore) String

func (s *BoltDBServiceStore) String() string

type MapServiceStore

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

func NewMapServiceStore

func NewMapServiceStore() *MapServiceStore

func (*MapServiceStore) Close

func (s *MapServiceStore) Close() error

func (*MapServiceStore) String

func (s *MapServiceStore) String() string

type PollingServiceStore

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

func NewPollingServiceStore

func NewPollingServiceStore(s ServiceStore, pollingInterval time.Duration) (*PollingServiceStore, error)

func (*PollingServiceStore) Close

func (s *PollingServiceStore) Close() error

func (*PollingServiceStore) String

func (s *PollingServiceStore) String() string

type Service

type Service struct {
	ServiceURL     string    `json:"service_url" yaml:"service_url"`
	SpecURL        string    `json:"spec_url" yaml:"spec_url"`
	Tags           []string  `json:"tags" yaml:"tags"`
	Description    string    `json:"description" yaml:"description"`
	HealthcheckURL string    `json:"healthcheck_url" yaml:"healthcheck_url"`
	Available      bool      `json:"health_confirmed" yaml:"health_confirmed"`
	LastChecked    time.Time `json:"last_checked,omitempty" yaml:"last_checked,omitempty"`
	LastAvailable  time.Time `json:"last_available,omitempty" yaml:"last_available,omitempty"`
}

type ServiceStore

type ServiceStore interface {
	Close() error
	String() string
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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