service

package
v1.22.38 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCmdIsRunning       = errors.New("agent: cmd is running, service not available")
	ErrorCmdUnsupportedType = errors.New("agent: unsupported cmd type")

	ErrorCmdScriptIsPersented     = errors.New("agent: the scripts should be empty for session open")
	ErrorCmdMissingSessionID      = errors.New("agent: the session id is required for cmd")
	ErrorCmdSessionNotFound       = errors.New("agent: session not found")
	ErrorCmdSessionMissingScripts = errors.New("agent: script is missing")
)

Functions

This section is empty.

Types

type CacheManager

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

func NewCacheManager

func NewCacheManager() *CacheManager

func (*CacheManager) Download

func (cm *CacheManager) Download(cmdIn *domain.ShellIn) string

Download download cache into a temp dir and return

func (*CacheManager) Resolve

func (cm *CacheManager) Resolve(cmdIn *domain.ShellIn)

Resolve resolve env vars in cache key and paths

func (*CacheManager) Upload

func (cm *CacheManager) Upload(cmdIn *domain.ShellIn, cacheDir string)

Upload upload all files/dirs from cache dir

type CmdService

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

CmdService receive and execute cmd

func GetCmdService

func GetCmdService() *CmdService

GetCmdService get singleton of cmd service

func (*CmdService) Execute

func (s *CmdService) Execute(bytes []byte) error

Execute execute cmd according to the type

func (*CmdService) IsRunning

func (s *CmdService) IsRunning() bool

IsRunning check is available to run cmd

type PluginManager

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

func NewPluginManager

func NewPluginManager(dir, server string) *PluginManager

func (*PluginManager) Load

func (p *PluginManager) Load(name string) error

Jump to

Keyboard shortcuts

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