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 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.
Click to show internal directories.
Click to hide internal directories.