service

package
v0.0.0-...-3dd6856 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreationTime

type CreationTime int

CreationTime represents the moment when the service was created compared to the agent start.

const (
	// Before the agent start.
	Before CreationTime = iota
	// After the agent start.
	After
)

type Service

type Service struct {
	Type         string
	Identifier   string
	CreationTime CreationTime
}

Service represents a process to tail logs for.

func NewService

func NewService(providerType string, identifier string, createdTime CreationTime) *Service

NewService returns a new service.

func (*Service) GetEntityID

func (s *Service) GetEntityID() string

GetEntityID return the entity identifier of the service

type Services

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

Services provides new and removed services.

func NewServices

func NewServices() *Services

NewServices returns a new services.

func (*Services) AddService

func (s *Services) AddService(service *Service)

AddService sends a new service to all the channels that registered.

func (*Services) GetAddedServicesForType

func (s *Services) GetAddedServicesForType(serviceType string) chan *Service

GetAddedServicesForType returns a stream of new services for a given type.

func (*Services) GetAllAddedServices

func (s *Services) GetAllAddedServices() chan *Service

GetAllAddedServices registers the channel to receive all added services.

func (*Services) GetAllRemovedServices

func (s *Services) GetAllRemovedServices() chan *Service

GetAllRemovedServices registers the channel to receive all removed services.

func (*Services) GetRemovedServicesForType

func (s *Services) GetRemovedServicesForType(serviceType string) chan *Service

GetRemovedServicesForType returns a stream of removed services for a given type.

func (*Services) RemoveService

func (s *Services) RemoveService(service *Service)

RemoveService sends a removed service to all the channels that registered.

Jump to

Keyboard shortcuts

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