descriptor

package
v2.1.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 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(kvscheduler kvs.KVScheduler, log logging.PluginLogger) (*MicroserviceDescriptor, error)

NewMicroserviceDescriptor creates a new instance of the descriptor for microservices.

func (*MicroserviceDescriptor) GetDescriptor

func (d *MicroserviceDescriptor) GetDescriptor() *kvs.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) Retrieve

func (d *MicroserviceDescriptor) Retrieve(correlate []kvs.KVWithMetadata) (values []kvs.KVWithMetadata, err error)

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

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