config

package
v0.0.0-...-f12bd69 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CAMContainerProbe = "container-probe"
	CAMProbe          = "probe"
	CAMEnter          = "enter"
	CAMTimeout        = "timeout"
	CAMSignal         = "signal"
	CAMExec           = "exec"
	CAMHostExec       = "host-exec"
	CAMAppExit        = "app-exit"
)

ContinueAfter mode enums

View Source
const (
	OAPNNone   = "none"
	OAPNEmpty  = "empty"
	OAPNPrefix = "prefix"
	OAPNRandom = "random"
)

ObfuscateAppPackageNames mode enums

View Source
const (
	ProtoHTTP   = "http"
	ProtoHTTPS  = "https"
	ProtoHTTP2  = "http2"
	ProtoHTTP2C = "http2c"
	ProtoWS     = "ws"
	ProtoWSS    = "wss"
)
View Source
const AppOptionsFilename = "slim.config.json"

AppOptionsFilename is the default name for the app configs

Variables

This section is empty.

Functions

func IsProto

func IsProto(value string) bool

Types

type AppNodejsInspectOptions

type AppNodejsInspectOptions struct {
	IncludePackages []string
	NextOpts        NodejsWebFrameworkInspectOptions
	NuxtOpts        NodejsWebFrameworkInspectOptions
}

type AppOptions

type AppOptions struct {
	Global *GlobalAppOptions `json:"global,omitempty"`
}

AppOptions provides a set of global application parameters and command-specific defaults AppOptions values override the default flag values if they are set AppOptions is loaded from the "slim.config.json" file stored in the state path directory

func NewAppOptionsFromFile

func NewAppOptionsFromFile(dir string) (*AppOptions, error)

type CBOBuildArg

type CBOBuildArg struct {
	Name  string
	Value string
}

type ContainerBuildOptions

type ContainerBuildOptions struct {
	Dockerfile        string
	DockerfileContext string
	Tag               string
	ExtraHosts        string
	BuildArgs         []CBOBuildArg
	Labels            map[string]string
	CacheFrom         []string
	Target            string
	NetworkMode       string
}

ContainerBuildOptions provides the options to use when building container images from Dockerfiles

type ContainerOverrides

type ContainerOverrides struct {
	User            string
	Entrypoint      []string
	ClearEntrypoint bool
	Cmd             []string
	ClearCmd        bool
	Workdir         string
	Env             []string
	Hostname        string
	Network         string
	ExposedPorts    map[docker.Port]struct{}
	Volumes         map[string]struct{}
	Labels          map[string]string
}

ContainerOverrides provides a set of container field overrides It can also be used to update the image instructions when the "image-overrides" flag is provided

type ContainerRunOptions

type ContainerRunOptions struct {
	HostConfig *docker.HostConfig
	//Explicit overrides for the base and host config fields
	//Host config field override are applied
	//on top of the fields in the HostConfig struct if it's provided (volume mounts are merged though)
	Runtime      string
	SysctlParams map[string]string
	ShmSize      int64
}

ContainerRunOptions provides the options to use running a container

type ContinueAfter

type ContinueAfter struct {
	Mode         string
	Timeout      time.Duration
	ContinueChan <-chan struct{}
}

ContinueAfter provides the command execution mode parameters

type DockerClient

type DockerClient struct {
	UseTLS      bool
	VerifyTLS   bool
	TLSCertPath string
	Host        string
	APIVersion  string
	Context     string
	Env         map[string]string
}

DockerClient provides Docker client parameters

type FastCGIProbeWrapperConfig

type FastCGIProbeWrapperConfig struct {
	// Root is the fastcgi root directory.
	// Defaults to the root directory of the container.
	Root string `json:"root,omitempty"`

	// The path in the URL will be split into two, with the first piece ending
	// with the value of SplitPath. The first piece will be assumed as the
	// actual resource (CGI script) name, and the second piece will be set to
	// PATH_INFO for the CGI script to use.
	SplitPath []string `json:"split_path,omitempty"`

	// Extra environment variables.
	EnvVars map[string]string `json:"env,omitempty"`

	// The duration used to set a deadline when connecting to an upstream.
	DialTimeout time.Duration `json:"dial_timeout,omitempty"`

	// The duration used to set a deadline when reading from the FastCGI server.
	ReadTimeout time.Duration `json:"read_timeout,omitempty"`

	// The duration used to set a deadline when sending to the FastCGI server.
	WriteTimeout time.Duration `json:"write_timeout,omitempty"`
}

FastCGI permits fine-grained configuration of the fastcgi RoundTripper.

type GlobalAppOptions

type GlobalAppOptions struct {
	NoColor                  *bool   `json:"no_color,omitempty"`
	CheckVersion             *bool   `json:"check_version,omitempty"`
	Debug                    *bool   `json:"debug,omitempty"`
	Verbose                  *bool   `json:"verbose,omitempty"`
	Quiet                    *bool   `json:"quiet,omitempty"`
	OutputFormat             *string `json:"output_format,omitempty"`
	LogLevel                 *string `json:"log_level,omitempty"`
	Log                      *string `json:"log,omitempty"`
	LogFormat                *string `json:"log_format,omitempty"`
	UseTLS                   *bool   `json:"tls,omitempty"`
	VerifyTLS                *bool   `json:"tls_verify,omitempty"`
	TLSCertPath              *string `json:"tls_cert_path,omitempty"`
	APIVersion               *string `json:"api_version,omitempty"`
	Host                     *string `json:"host,omitempty"`
	StatePath                *string `json:"state_path,omitempty"`
	ReportLocation           *string `json:"report_location,omitempty"`
	CRTConnection            *string `json:"crt_connection,omitempty"`
	CRTContext               *string `json:"crt_context,omitempty"`
	ArchiveState             *string `json:"archive_state,omitempty"`
	CRTIOInactivityTimeout   *int    `json:"crt_io_inactivity_timeout,omitempty"`
	CRTSaveInactivityTimeout *int    `json:"crt_save_inactivity_timeout,omitempty"`
	CRTCopyInactivityTimeout *int    `json:"crt_copy_inactivity_timeout,omitempty"`
}

GlobalAppOptions provides a set of global application parameters

type HTTPProbeCmd

type HTTPProbeCmd struct {
	Method        string   `json:"method"`
	Resource      string   `json:"resource"`
	Port          int      `json:"port"`
	Protocol      string   `json:"protocol"`
	Headers       []string `json:"headers"`
	Body          string   `json:"body"`
	BodyFile      string   `json:"body_file"`
	BodyGenerate  string   `json:"body_generate"`
	BodyIsForm    bool     `json:"body_is_form"`
	FormFieldName string   `json:"form_field_name"`
	FormFileName  string   `json:"form_file_name"`
	Username      string   `json:"username"`
	Password      string   `json:"password"`
	Crawl         bool     `json:"crawl"`

	FastCGI *FastCGIProbeWrapperConfig `json:"fastcgi,omitempty"`
}

HTTPProbeCmd provides the HTTP probe parameters

type HTTPProbeCmds

type HTTPProbeCmds struct {
	Commands []HTTPProbeCmd `json:"commands"`
}

HTTPProbeCmds is a list of HTTPProbeCmd instances

type HTTPProbeOptions

type HTTPProbeOptions struct {
	Do                 bool
	Full               bool
	ExitOnFailure      bool
	ExitOnFailureCount int
	FailOnStatus5xx    bool

	ClientTimeout      int
	CrawlClientTimeout int
	WsClientTimeout    int //todo

	Cmds  []HTTPProbeCmd
	Ports []uint16

	StartWait        int
	RetryCount       int
	RetryWait        int
	RetryOff         bool
	ProbeConcurrency int

	CrawlMaxDepth       int
	CrawlMaxPageCount   int
	CrawlConcurrency    int
	CrawlConcurrencyMax int

	APISpecs     []string
	APISpecFiles []string

	ProxyEndpoint string
	ProxyPort     int
}

type ImageNewInstructions

type ImageNewInstructions struct {
	Entrypoint         []string
	ClearEntrypoint    bool
	Cmd                []string
	ClearCmd           bool
	Workdir            string
	Env                []string
	Volumes            map[string]struct{}
	ExposedPorts       map[docker.Port]struct{}
	Labels             map[string]string
	RemoveEnvs         map[string]struct{}
	RemoveVolumes      map[string]struct{}
	RemoveExposedPorts map[docker.Port]struct{}
	RemoveLabels       map[string]struct{}
}

ImageNewInstructions provides a set new image instructions

type KubernetesOptions

type KubernetesOptions struct {
	Target         KubernetesTarget
	TargetOverride KubernetesTargetOverride

	Manifests  []string
	Kubeconfig string
}

func (KubernetesOptions) HasTargetSet

func (ko KubernetesOptions) HasTargetSet() bool

type KubernetesTarget

type KubernetesTarget struct {
	Workload  string
	Namespace string
	Container string
}

func (*KubernetesTarget) WorkloadName

func (t *KubernetesTarget) WorkloadName() (string, error)

type KubernetesTargetOverride

type KubernetesTargetOverride struct {
	Image string
}

type NodejsWebFrameworkInspectOptions

type NodejsWebFrameworkInspectOptions struct {
	IncludeAppDir         bool
	IncludeBuildDir       bool
	IncludeDistDir        bool
	IncludeStaticDir      bool
	IncludeNodeModulesDir bool
}

type VolumeMount

type VolumeMount struct {
	Source      string
	Destination string
	Options     string
}

VolumeMount provides the volume mount configuration information

Jump to

Keyboard shortcuts

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