service

package
v1.51.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package service handles interacting with the OS specific service manager

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(linuxSvc linuxService)

Option is an extra option for creating a Service

func WithServiceFile

func WithServiceFile(svcFilePath string) Option

WithServiceFile returns an option setting the service file to use when updating using the service

type Service

type Service interface {
	// Start the service
	Start() error

	// Stop the service
	Stop() error

	// Updates the old service configuration to the new one
	Update() error

	// Backup backs the current service configuration
	Backup() error
}

Service represents a controllable service

func NewService

func NewService(logger *zap.Logger, installDir string, opts ...Option) Service

NewService returns an instance of the Service interface for managing the observiq-otel-collector service on the current OS.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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