types

package
v0.0.0-...-182d01c Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2016 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package types is the main set of data types defined within CPM and used across all tiers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	ID          string //unique key
	ProjectID   string //foreign key to project
	Name        string //cluster name
	ClusterType string //async or sync type of replication
	Status      string //either up or down or initialized
	CreateDate  string
	Containers  map[string]string //map of containers within this cluster
	Token       string
}

type ClusterNode

type ClusterNode struct {
	ID          string //unique key
	ClusterID   string //foreign key to cluster
	Name        string //cluster name
	Role        string //role of node in cluster
	Image       string //docker image of node
	CreateDate  string
	Status      string
	ProjectID   string //foreign key to project
	ProjectName string //project name
	ClusterName string //cluster name
	ServerID    string //server info
	IPAddress   string //current IP address
}

type ClusterProfiles

type ClusterProfiles struct {
	Size           string //either SM, MED, or LG
	Count          string //number of standby nodes
	Algo           string //round-robin
	MasterProfile  string //the docker profile to use for the master node
	StandbyProfile string //the docker profile to use for the standby nodes
	MasterServer   string //the server class to place the master on
	StandbyServer  string //the server class to place the standby nodes on
	Token          string
}

type Container

type Container struct {
	ID          string //unique key
	ClusterID   string //foreign key to cluster
	Name        string //container name, also used as the host name
	Role        string //role of this container (master, standby, standalone)
	Image       string //docker image this container is based on
	CreateDate  string
	ProjectID   string //foreign key to project
	ProjectName string //project name this container is in
	ClusterName string //cluster name this contaienr is part of
}

type ContainerUser

type ContainerUser struct {
	ID             string //unique key
	Containername  string //container name
	ContainerID    string //foreign key to the container
	Passwd         string //database password of this user
	Rolname        string //postgres role name
	Rolsuper       string //postgres superuser permission flag
	Rolinherit     string //postgres inherit permission flag
	Rolcreaterole  string //postgres createrole permission flag
	Rolcreatedb    string //postgres createdb permission flag
	Rolcanlogin    string //postgres login permission flag
	Rolreplication string //postgres replication permission flag
	UpdateDate     string
}

type Credential

type Credential struct {
	Host     string //container name
	Database string //database name
	Username string //database user name
	Password string //database user password
	Port     string //database port number
}

type HealthCheck

type HealthCheck struct {
	ID             string //unique key
	ProjectName    string //project name
	ProjectID      string //foreign key to project
	ContainerName  string //container name
	ContainerID    string //foreign key to container
	ContainerRole  string //container role
	ContainerImage string //docker image of container
	Status         string //either up or down
	UpdateDate     string
}

type MonitorContainerParam

type MonitorContainerParam struct {
	ID           string //unique key
	Metric       string //metric name
	DatabaseName string //database name
}

type MonitorOutput

type MonitorOutput struct {
	Metric   string
	Response string
}

type MonitorServerParam

type MonitorServerParam struct {
	ServerID string //foreign key to server
	Metric   string
}

type NodeUser

type NodeUser struct {
	ID             string //unique key
	Containername  string //container name
	Rolname        string //role name of this suser
	Passwd         string //password of this user
	Updatedt       string
	Token          string
	Rolsuper       bool //superuser permission flag
	Rolinherit     bool //inherit permission flag
	Rolcreaterole  bool //createrole permission flag
	Rolcreatedb    bool //createdb permission flag
	Rollogin       bool //login permission flag
	Rolreplication bool //replication permission flag
}

type PostgresControldata

type PostgresControldata struct {
	Name  string
	Value string
}

type PostgresSetting

type PostgresSetting struct {
	Name           string
	CurrentSetting string
	Source         string
}

type PostgresStatement

type PostgresStatement struct {
	Database   string //pg_stat_statements database value
	Query      string //pg_stat_statements query value
	Calls      string //pg_stat_statements calls value
	TotalTime  string //pg_stat_statements totaltime value
	Rows       string //pg_stat_statements rows value
	HitPercent string //pg_stat_statements hitpercent value
}

type Profiles

type Profiles struct {
	SmallCPU  string //SM profile cpu shares setting
	SmallMEM  string //SM profile memory setting
	MediumCPU string //MED profile cpu shares setting
	MediumMEM string //MED profile docker memory setting
	LargeCPU  string //LG profile docker cpu shares setting
	LargeMEM  string //LG profile docker memory setting
	Token     string
}

type Project

type Project struct {
	ID         string            //unique key
	Name       string            //project name
	Desc       string            //description
	Containers map[string]string //map of containers in this project
	Clusters   map[string]string //map of clusters in this project
	Proxies    map[string]string //map of proxies in this project
	UpdateDate string
	Token      string
}

type ProvisionStatus

type ProvisionStatus struct {
	Status string
	ID     string
}

type Proxy

type Proxy struct {
	ID              string //unique key
	Database        string //database name
	Host            string //database host name
	Usename         string //database user name
	Passwd          string //database password
	ContainerID     string //foreign key to container
	ContainerName   string //container name
	ServerName      string //server name
	Status          string //database status either down or running
	ContainerStatus string //container status either down or running
	ProjectID       string //foreign key to project
	Port            string //database port number
	UpdateDate      string
	Token           string
}

type Server

type Server struct {
	ID          string //unique key
	Name        string //server name
	IPAddress   string //server ip address
	Port        string //swarm port
	ServerClass string //the class of the server, SM, MED, LG
	CreateDate  string
	NodeCount   string //calculated value of the number of containers assigned to this server
}

type Setting

type Setting struct {
	Name        string //setting name (key)
	Value       string //setting value
	Description string
	UpdateDate  string
	Token       string
}

type Settings

type Settings struct {
	AdminURL       string
	DockerRegistry string
	PGPort         string
	DomainName     string
	Token          string
}

type SimpleStatus

type SimpleStatus struct {
	Status string
}

Jump to

Keyboard shortcuts

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