descriptor

package
v2.0.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MicroserviceDescriptorName is the name of the descriptor for microservices.
	MicroserviceDescriptorName = "microservice"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Microservice

type Microservice struct {
	Label string
	PID   int
	ID    string
}

Microservice is used to store PID and ID of the container running a given microservice.

type MicroserviceDescriptor

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

MicroserviceDescriptor watches Docker and notifies KVScheduler about newly started and stopped microservices.

func NewMicroserviceDescriptor

func NewMicroserviceDescriptor(scheduler scheduler.KVScheduler, log logging.PluginLogger) (*MicroserviceDescriptor, error)

NewMicroserviceDescriptor creates a new instance of the descriptor for microservices.

func (*MicroserviceDescriptor) Dump

func (d *MicroserviceDescriptor) Dump(correlate []scheduler.KVWithMetadata) (dump []scheduler.KVWithMetadata, err error)

Dump returns key with empty value for every currently existing microservice.

func (*MicroserviceDescriptor) GetDescriptor

func (d *MicroserviceDescriptor) GetDescriptor() *scheduler.KVDescriptor

GetDescriptor returns descriptor suitable for registration with the KVScheduler.

func (*MicroserviceDescriptor) GetMicroserviceStateData

func (d *MicroserviceDescriptor) GetMicroserviceStateData(msLabel string) (ms *Microservice, found bool)

GetMicroserviceStateData returns state data for the given microservice.

func (*MicroserviceDescriptor) IsMicroserviceKey

func (d *MicroserviceDescriptor) IsMicroserviceKey(key string) bool

IsMicroserviceKey returns true for key identifying microservices.

func (*MicroserviceDescriptor) StartTracker

func (d *MicroserviceDescriptor) StartTracker()

StartTracker starts microservice tracker,

func (*MicroserviceDescriptor) StopTracker

func (d *MicroserviceDescriptor) StopTracker()

StopTracker stops microservice tracker,

Jump to

Keyboard shortcuts

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