service

package
v0.0.0-...-6248505 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service provides the API for working with external controllers.

func NewService

func NewService(st State) *Service

NewService returns a new service reference wrapping the input state.

func (*Service) GetFlag

func (s *Service) GetFlag(ctx context.Context, flag string) (bool, error)

GetFlag returns the value of a flag.

func (*Service) SetFlag

func (s *Service) SetFlag(ctx context.Context, flag string, value bool, description string) error

SetFlag sets the value of a flag. Description is used to describe the flag and it's potential state.

type State

type State interface {
	SetFlag(ctx context.Context, flag string, value bool, description string) error
	GetFlag(context.Context, string) (bool, error)
}

State describes retrieval and persistence methods for storage.

Jump to

Keyboard shortcuts

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