Documentation ¶
Index ¶
- Constants
- type Microservice
- type MicroserviceDescriptor
- func (d *MicroserviceDescriptor) GetDescriptor() *kvs.KVDescriptor
- func (d *MicroserviceDescriptor) GetMicroserviceStateData(msLabel string) (ms *Microservice, found bool)
- func (d *MicroserviceDescriptor) IsMicroserviceKey(key string) bool
- func (d *MicroserviceDescriptor) Retrieve(correlate []kvs.KVWithMetadata) (values []kvs.KVWithMetadata, err error)
- func (d *MicroserviceDescriptor) StartTracker()
- func (d *MicroserviceDescriptor) StopTracker()
Constants ¶
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 ¶
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,