services

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const SERVICE_STATUS_REPORT_PERIOD = 30 * time.Second
View Source
const SERVICE_STATUS_REPORT_TIMEOUT = 15 * time.Second

Variables

This section is empty.

Functions

func Bootstrap added in v1.0.0

func Bootstrap(ctx context.Context, flags *config.Flags, logger log.Logger) (*config.Flags, error)

func Execute

func Execute(ctx context.Context, flags *config.Flags, logger log.Logger) (govnr.ShutdownWaiter, error)

func GetSerializedMetrics added in v1.6.0

func GetSerializedMetrics(registry *prometheus.Registry) (value string, err error)

func GetStatusAndMetrics added in v1.6.0

func GetStatusAndMetrics(ctx context.Context, logger log.Logger, startupTimestamp time.Time, dockerStatusPeriod time.Duration) (status StatusResponse, metrics Metrics)

func InitializeAndUpdatePrometheusMetrics added in v1.6.0

func InitializeAndUpdatePrometheusMetrics(registry *prometheus.Registry, metrics Metrics)

func WatchAndReportStatusAndMetrics added in v1.6.0

func WatchAndReportStatusAndMetrics(ctx context.Context, logger log.Logger, statusFilePath string, metricsFilePath string) govnr.ShutdownWaiter

Types

type BoyarService

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

func NewCoreBoyarService

func NewCoreBoyarService(logger log.Logger) *BoyarService

func (*BoyarService) OnConfigChange

func (coreBoyar *BoyarService) OnConfigChange(ctx context.Context, cfg config.NodeConfiguration) error

type ConfigurationPollService

type ConfigurationPollService struct {
	Output <-chan config.NodeConfiguration
	// contains filtered or unexported fields
}

func NewConfigurationPollService

func NewConfigurationPollService(flags *config.Flags, logger log.Logger) *ConfigurationPollService

func (*ConfigurationPollService) Resend

func (service *ConfigurationPollService) Resend()

func (*ConfigurationPollService) Start

type DiskMetric added in v1.6.0

type DiskMetric struct {
	Mountpoint  string
	TotalMbytes float64
	UsedMbytes  float64
	UsedPercent float64
}

func ReadDiskMetrics added in v1.6.0

func ReadDiskMetrics(logger log.Logger) (diskMetrics []DiskMetric, errors []error)

type Metrics added in v1.6.0

type Metrics struct {
	BoyarUptime       float64
	CPULoadPercent    float64
	MemoryUsedPercent float64
	MemoryUsedMBytes  float64
	MemoryTotalMBytes float64
	EFSAccessTimeMs   uint64
	Disks             []DiskMetric
}

func CollectMetrics added in v1.6.0

func CollectMetrics(ctx context.Context, logger log.Logger, startupTimestamp time.Time) (metrics Metrics, aggregateError error)

type PrometheusMetrics added in v1.6.0

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

type StatusResponse added in v1.1.0

type StatusResponse struct {
	Timestamp time.Time
	Status    string
	Error     string
	Payload   map[string]interface{}
}

Jump to

Keyboard shortcuts

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