lifecycle

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceEntry

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

ServiceEntry is an internal service entry implementation.

func NewServiceEntry

func NewServiceEntry(cfg types.ServiceConfig, stateCh chan<- ServiceState) *ServiceEntry

NewServiceEntry creates new service entry.

func (*ServiceEntry) Close

func (e *ServiceEntry) Close()

Close service entry.

func (*ServiceEntry) Start

func (e *ServiceEntry) Start(ctx context.Context) error

Start servvice.

func (*ServiceEntry) State

func (e *ServiceEntry) State() ServiceState

State of the service.

func (*ServiceEntry) Stop

func (e *ServiceEntry) Stop(ctx context.Context) error

Stop service.

type ServiceState

type ServiceState struct {
	Status types.ServiceStatus
	Error  error
}

ServiceState represents service status and optional error.

Jump to

Keyboard shortcuts

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