services

package
v0.0.0-...-d7e6233 Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

type Monitor struct {
	ConfigTemplate string
	DatadogType    string
	Service        *Service
}

Monitor contains information about a particular monitor for a service

type NodeServices

type NodeServices struct {
	Node     string
	Services []Service
}

type Service

type Service struct {
	consul.AgentService
	Monitors []Monitor
	Node     string
}

Service contains details of services for a particular node, as well as the templates to use for that service

type Services

type Services struct {
	Services      map[string]*Service
	ByNode        map[string][]*Service
	MonitorByType map[string][]*Monitor
}

Services stores services per node, and handles writing them out to actual config files

func NewServices

func NewServices() Services

NewServiceConfig will generate a new ServiceConfig object to populate with services

func (*Services) Add

func (services *Services) Add(newService Service)

Add adds a new NodeService to our list of services, and overwrites all previous services for that node

func (*Services) ClearNode

func (services *Services) ClearNode(nodeName string)

ClearNode will remove all services from a specific node

Jump to

Keyboard shortcuts

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