types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compose

type Compose struct {
	Version  string              `yaml:"version"`
	Services map[string]Service  `yaml:"services"`
	Networks map[string]Networks `yaml:"networks"`
	Volumes  map[string]Volumes  `yaml:"volumes"`
}

Compose - The main structure of the supported docker-compose syntax

type Config

type Config struct {
	Principal      string
	LogLevel       string
	MinVersion     string
	AppName        string
	EnableSyslog   bool
	Hostname       string
	Listen         string
	Domain         string
	Credentials    UserCredentials
	PrefixHostname string
	PrefixTaskName string
	CPU            float64
	Memory         float64
	Disk           float64
	RedisServer    string
	RedisClient    *goredis.Client
	RedisCTX       context.Context
	RedisPassword  string
	RedisDB        int
	SkipSSL        bool
	SSLKey         string
	SSLCrt         string
	Suppress       bool
	Agents         MesosAgent
}

Config is a struct of the framework configuration

type Deploy

type Deploy struct {
	Resources struct {
		Limits struct {
			CPUs   string `yaml:"cpus"`
			Memory string `yaml:"memory"`
		} `yaml:"limits"`
	} `yaml:"resources"`
}

Deploy - The mesos resources to deploy a task

type ErrorMsg

type ErrorMsg struct {
	Message  string
	Number   int
	Function string
}

ErrorMsg hold the structure of error messages

type MesosAgent added in v0.3.0

type MesosAgent struct {
	Slaves []struct {
		ID         string `json:"id"`
		Hostname   string `json:"hostname"`
		Port       int    `json:"port"`
		Attributes struct {
		} `json:"attributes"`
		Pid              string  `json:"pid"`
		RegisteredTime   float64 `json:"registered_time"`
		ReregisteredTime float64 `json:"reregistered_time"`
		Resources        struct {
			Disk  float64 `json:"disk"`
			Mem   float64 `json:"mem"`
			Gpus  float64 `json:"gpus"`
			Cpus  float64 `json:"cpus"`
			Ports string  `json:"ports"`
		} `json:"resources"`
		UsedResources struct {
			Disk  float64 `json:"disk"`
			Mem   float64 `json:"mem"`
			Gpus  float64 `json:"gpus"`
			Cpus  float64 `json:"cpus"`
			Ports string  `json:"ports"`
		} `json:"used_resources"`
		OfferedResources struct {
			Disk float64 `json:"disk"`
			Mem  float64 `json:"mem"`
			Gpus float64 `json:"gpus"`
			Cpus float64 `json:"cpus"`
		} `json:"offered_resources"`
		ReservedResources struct {
		} `json:"reserved_resources"`
		UnreservedResources struct {
			Disk  float64 `json:"disk"`
			Mem   float64 `json:"mem"`
			Gpus  float64 `json:"gpus"`
			Cpus  float64 `json:"cpus"`
			Ports string  `json:"ports"`
		} `json:"unreserved_resources"`
		Active                bool     `json:"active"`
		Deactivated           bool     `json:"deactivated"`
		Version               string   `json:"version"`
		Capabilities          []string `json:"capabilities"`
		ReservedResourcesFull struct {
		} `json:"reserved_resources_full"`
		UnreservedResourcesFull []struct {
			Name   string `json:"name"`
			Type   string `json:"type"`
			Scalar struct {
				Value float64 `json:"value"`
			} `json:"scalar,omitempty"`
			Role   string `json:"role"`
			Ranges struct {
				Range []struct {
					Begin int `json:"begin"`
					End   int `json:"end"`
				} `json:"range"`
			} `json:"ranges,omitempty"`
		} `json:"unreserved_resources_full"`
		UsedResourcesFull []struct {
			Name   string `json:"name"`
			Type   string `json:"type"`
			Scalar struct {
				Value float64 `json:"value"`
			} `json:"scalar,omitempty"`
			Role           string `json:"role"`
			AllocationInfo struct {
				Role string `json:"role"`
			} `json:"allocation_info"`
			Ranges struct {
				Range []struct {
					Begin int `json:"begin"`
					End   int `json:"end"`
				} `json:"range"`
			} `json:"ranges,omitempty"`
		} `json:"used_resources_full"`
		OfferedResourcesFull []interface{} `json:"offered_resources_full"`
	} `json:"slaves"`
	RecoveredSlaves []interface{} `json:"recovered_slaves"`
}

MesosAgent ..

type MesosAgentContainers added in v0.3.0

type MesosAgentContainers []struct {
	ContainerID  string `json:"container_id"`
	ExecutorID   string `json:"executor_id"`
	ExecutorName string `json:"executor_name"`
	FrameworkID  string `json:"framework_id"`
	Source       string `json:"source"`
	Status       struct {
		ContainerID struct {
			Value string `json:"value"`
		} `json:"container_id"`
	} `json:"status"`
}

MesosAgentContainers ..

type Networks

type Networks struct {
	External bool   `yaml:"external"`
	Name     string `yaml:"name"`
	Driver   string `yaml:"driver"`
}

Networks - The docker-compose network syntax

type Service

type Service struct {
	Network     []string               `yaml:"network"`
	Build       string                 `yaml:"build"`
	Restart     string                 `yaml:"restart"`
	Volumes     []string               `yaml:"volumes"`
	Environment []string               `yaml:"environment"`
	DependsOn   []string               `yaml:"depends_on"`
	Ports       []string               `yaml:"ports"`
	Image       string                 `yaml:"image"`
	Labels      map[string]interface{} `yaml:"labels"`
	NetworkMode string                 `yaml:"network_mode"`
	Privileged  bool                   `yaml:"privileged"`
	Command     []string               `yaml:"command"`
	Deploy      Deploy                 `yaml:"deploy"`
	Hostname    string                 `yaml:"hostname"`
}

Service - The docker-compose service parameters

type UserCredentials

type UserCredentials struct {
	Username string
	Password string
}

UserCredentials - The Username and Password to authenticate against this framework

type Volumes

type Volumes struct {
	Driver string `yaml:"driver"`
}

Volumes - The docker-compose volumes syntax

Jump to

Keyboard shortcuts

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