Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunApps ¶ added in v0.10.0
func RunApps(ctx context.Context, config RunAppsConfig, apps ...Application) error
RunApps runs applications.
Types ¶
type Application ¶ added in v0.10.0
type Application interface { GetName() string GetIP() net.IP GetTaskFunc(config RunAppsConfig, appHosts map[string]net.IP, spawn parallel.SpawnFn, logsCh chan<- logEnvelope) task.Func }
Application represents an app to run in isolation.
type Container ¶
type Container struct { // Name is the name of the container. Name string // Image is the name of the image. Image string // Tag is the tag of the image. Tag string // EnvVars sets environment variables inside container. EnvVars map[string]string // User is the username or UID to use. User string // Mounts are the mounts to configure inside container. Mounts []Mount // WorkingDir specifies a path to working directory. WorkingDir string // Entrypoint sets entrypoint for container. Entrypoint []string // Args sets args for container. Args []string // IP is the IP address of the container. IP *net.IPNet // DNS is the list of nameservers to configure inside container. DNS []net.IP // Hosts is the list of hosts and their IP addresses to resolve inside namespace. Hosts map[string]net.IP // ExposedPorts is the list of ports to expose. ExposedPorts []ExposedPort }
Container defines container.
type Embedded ¶ added in v0.10.0
type Embedded struct { // Name is the name of the function. Name string // Mounts are the mounts to configure inside embedded function. Mounts []Mount // Args sets args for embedded function. Args []string // IP is the IP address of the embedded function. IP *net.IPNet // DNS is the list of nameservers to configure inside embedded function. DNS []net.IP // Hosts is the list of hosts and their IP addresses to resolve inside namespace. Hosts map[string]net.IP // ExposedPorts is the list of ports to expose. ExposedPorts []ExposedPort }
Embedded defines embedded function to run inside isolation.
type ExposedPort ¶
type ExposedPort struct { Protocol string HostIP net.IP HostPort uint16 NamespacePort uint16 Public bool }
ExposedPort defines a port to be exposed from the container.
type LogsConfig ¶ added in v0.11.0
type LogsConfig struct {
Address string
}
LogsConfig is the configuration of remote loki logs receiver.
type RunAppsConfig ¶ added in v0.10.0
type RunAppsConfig struct { CacheDir string AppsDir string LogsConfig LogsConfig }
RunAppsConfig is the config for running applications.
Click to show internal directories.
Click to hide internal directories.