service

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 13 Imported by: 2

Documentation

Overview

Package service is a library which allows you to write well constructed Altid services

Overview

service aims to present a way to write canonical services, which behave correctly in all instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserConfDir

func UserConfDir() (string, error)

UserConfDir returns the default root directory to use for user-specific configuration data. Users should create their own application-specific subdirectory within this one and use that. On Unix systems, it returns $XDG_CONFIG_HOME as specified by https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.config. On Darwin, it returns $HOME/Library/Preferences. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib.

func UserShareDir

func UserShareDir() (string, error)

UserShareDir returns the default root directory to use for user-specific application data. Users should create their own application-specific subdirectory within this one and use that. On Unix systems, it returns $XDG_DATA_HOME as specified by https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.local/share. On Darwin, it returns $HOME/Library. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib.

Types

type Service added in v0.2.2

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

func New

func New(name string, address string, debug bool) *Service

func (*Service) Listen added in v0.2.2

func (s *Service) Listen() error

func (*Service) SetCommands added in v0.2.2

func (s *Service) SetCommands(cmds []*commander.Command)

func (*Service) WithCallbacks added in v0.2.2

func (s *Service) WithCallbacks(cb callback.Callback)

func (*Service) WithContext added in v0.2.2

func (s *Service) WithContext(ctx context.Context)

func (*Service) WithListener added in v0.2.2

func (s *Service) WithListener(l listener.Listener)

func (*Service) WithRunner added in v0.2.2

func (s *Service) WithRunner(r runner.Runner)

func (*Service) WithStore added in v0.2.2

func (s *Service) WithStore(st store.Filer)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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