repository

package
v0.0.0-...-0178fca Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultGlobalServiceName is default service name
	DefaultGlobalServiceName = "meshem_envoy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryInfo

type DiscoveryInfo struct {
	Name    string
	Address model.Address
	Tags    map[string]string
}

type DiscoveryRepository

type DiscoveryRepository interface {
	Register(host model.Host, tags map[string]string) error
	Unregister(hostname string) error
	FindByName(hostname string) (*DiscoveryInfo, bool, error)
}

DiscoveryRepository provides functions for discovery service registration

func NewDiscoveryConsul

func NewDiscoveryConsul(consul *utils.Consul, globalName string) DiscoveryRepository

NewDiscoveryConsul creates DiscoverRepository instance which uses a consul as datastore.

type InventoryRepository

type InventoryRepository interface {
	PutHost(host model.Host) error
	SelectHostByName(name string) (model.Host, bool, error)
	DeleteHost(name string) (bool, error)
	SelectAllHostNames() ([]string, error)
	SelectAllHosts() ([]model.Host, error)
	SelectHostsOfService(service string) ([]model.Host, error)
	PutService(svc model.Service, version model.Version) error
	SelectServiceByName(name string) (model.Service, bool, error)
	DeleteService(name string) (bool, error)
	SelectAllServiceNames() ([]string, error)
	SelectAllServices() ([]model.Service, error)
	AddServiceDependency(serviceName string, depend model.DependentService, version model.Version) error
	RemoveServiceDependency(serviceName string, depend string, version model.Version) (bool, error)
	SelectReferringServiceNamesTo(service string) ([]string, error)
}

InventoryRepository provides interface to control storage which stores the inventories information.

func NewInventoryConsul

func NewInventoryConsul(consul *utils.Consul) InventoryRepository

func NewInventoryHeap

func NewInventoryHeap() InventoryRepository

NewInventoryHeap creates a heap inventory instance.

Jump to

Keyboard shortcuts

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