exteriord

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) int

Types

type LocalStorageStateBackend

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

func NewLocalStorageStateBackend

func NewLocalStorageStateBackend(path string) *LocalStorageStateBackend

func (*LocalStorageStateBackend) LoadStates

func (b *LocalStorageStateBackend) LoadStates() (map[string]string, error)

func (*LocalStorageStateBackend) SaveStates

func (b *LocalStorageStateBackend) SaveStates(state map[string]string) error

type RPCHandler

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

func NewRPCHandler

func NewRPCHandler(s *rpc.Server, msgChan chan outbound.OutboundMessage, states *StateStore, cancelFn func()) *RPCHandler

func (*RPCHandler) Bind

func (h *RPCHandler) Bind()

func (*RPCHandler) HandleProcDone

func (h *RPCHandler) HandleProcDone(req *rpc.AbstractRequest) error

func (*RPCHandler) HandleProcRegisterStopHook

func (h *RPCHandler) HandleProcRegisterStopHook(req *rpc.AbstractRequest) error

func (*RPCHandler) HandleStateGet

func (h *RPCHandler) HandleStateGet(req *rpc.AbstractRequest) (any, error)

func (*RPCHandler) HandleStateRemove

func (h *RPCHandler) HandleStateRemove(req *rpc.AbstractRequest) (any, error)

func (*RPCHandler) HandleStateSet

func (h *RPCHandler) HandleStateSet(req *rpc.AbstractRequest) (any, error)

func (*RPCHandler) HandleStatusPush

func (h *RPCHandler) HandleStatusPush(req *rpc.AbstractRequest) error

type StateBackend

type StateBackend interface {
	LoadStates() (map[string]string, error)
	SaveStates(states map[string]string) error
}

type StateStore

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

func NewStateStore

func NewStateStore(backend StateBackend) *StateStore

func (*StateStore) Get

func (s *StateStore) Get(key string) (string, error)

func (*StateStore) Remove

func (s *StateStore) Remove(key string) error

func (*StateStore) Set

func (s *StateStore) Set(key, value string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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