system

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationJson      = "application/json"
	ClaceServiceLocation = "clace"
)
View Source
const DEFAULT_CONFIG = "clace.default.toml"
View Source
const Scheme = "http+unix"

Scheme is the URL scheme used for HTTP over UNIX domain sockets.

Variables

This section is empty.

Functions

func KillGroup

func KillGroup(process *os.Process) error

KillGroup kills the process group

func LoadClientConfig

func LoadClientConfig(contents string, config *types.ClientConfig) error

LoadClientConfig load a ClientConfig from the given contents

func LoadGlobalConfig

func LoadGlobalConfig(contents string, config *types.GlobalConfig) error

LoadGlobalConfig load a GlobalConfig from the given contents

func LoadServerConfig

func LoadServerConfig(contents string, config *types.ServerConfig) error

LoadServerConfig loads a ServerConfig from the given contents

func NewClientConfigEmbedded

func NewClientConfigEmbedded() (*types.ClientConfig, error)

NewClientConfigEmbedded reads the embedded toml file and creates a ClientConfig

func NewServerConfigEmbedded

func NewServerConfigEmbedded() (*types.ServerConfig, error)

NewServerConfigEmbedded reads the embedded toml file and creates a ServerConfig

func SetProcessGroup

func SetProcessGroup(cmd *exec.Cmd)

SetProcessGroup sets the process group flag for the command

Types

type HttpClient

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

func NewHttpClient

func NewHttpClient(serverUri, user, password string, skipCertCheck bool) *HttpClient

NewHttpClient creates a new HttpClient instance

func (*HttpClient) Delete

func (h *HttpClient) Delete(url string, params url.Values, output any) error

func (*HttpClient) Get

func (h *HttpClient) Get(url string, params url.Values, output any) error

func (*HttpClient) Post

func (h *HttpClient) Post(url string, params url.Values, input any, output any) error

type SecretManager added in v0.7.2

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

SecretManager provides access to the secrets for the system

func NewSecretManager added in v0.7.2

func NewSecretManager(ctx context.Context, secretConfig map[string]types.SecretConfig) (*SecretManager, error)

func (*SecretManager) EvalTemplate added in v0.7.2

func (s *SecretManager) EvalTemplate(input string) (string, error)

EvalTemplate evaluates the input string and replaces any secret placeholders with the actual secret value

type Transport

type Transport struct {
	// DialTimeout is deprecated. Use context instead.
	DialTimeout time.Duration
	// RequestTimeout is deprecated and has no effect.
	RequestTimeout time.Duration
	// ResponseHeaderTimeout is deprecated. Use context instead.
	ResponseHeaderTimeout time.Duration
	// contains filtered or unexported fields
}

Transport is a http.RoundTripper that connects to Unix domain sockets.

func (*Transport) RegisterLocation

func (t *Transport) RegisterLocation(loc string, path string)

RegisterLocation registers an URL location and maps it to the given file system path.

Calling RegisterLocation twice for the same location is a programmer error, and causes a panic.

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip executes a single HTTP transaction. See net/http.RoundTripper.

Jump to

Keyboard shortcuts

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