service

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 1 Imported by: 5

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