manage

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 7 Imported by: 21

Documentation

Index

Constants

View Source
const (
	// special service operations
	SpecialOpPrefix      = "?"
	ListServiceOp        = SpecialOpPrefix + "List-Service"
	ListServiceMemberOp  = SpecialOpPrefix + "List-ServiceMember"
	GetConfigFileOp      = SpecialOpPrefix + "Get-Config-File"
	GetServiceStatusOp   = SpecialOpPrefix + "Get-Service-Status"
	ServiceInitializedOp = SpecialOpPrefix + "Set-Service-Initialized"

	CreateServiceOp         = SpecialOpPrefix + "Create-Service"
	UpdateServiceConfigOp   = SpecialOpPrefix + "Update-Service-Config"
	UpdateServiceResourceOp = SpecialOpPrefix + "Update-Service-Resource"
	StopServiceOp           = SpecialOpPrefix + "Stop-Service"
	StartServiceOp          = SpecialOpPrefix + "Start-Service"
	DeleteServiceOp         = SpecialOpPrefix + "Delete-Service"
	UpgradeServiceOp        = SpecialOpPrefix + "Upgrade-Service"
	RunTaskOp               = SpecialOpPrefix + "Run-Task"
	GetTaskStatusOp         = SpecialOpPrefix + "Get-Task-Status"
	DeleteTaskOp            = SpecialOpPrefix + "Delete-Task"
	// The service related management task
	RollingRestartServiceOp = SpecialOpPrefix + "RollingRestart-Service"
	GetServiceTaskStatusOp  = SpecialOpPrefix + "Get-ServiceTask-Status"

	CatalogOpPrefix              = SpecialOpPrefix + "Catalog-"
	CatalogCreateMongoDBOp       = CatalogOpPrefix + "Create-MongoDB"
	CatalogCreatePostgreSQLOp    = CatalogOpPrefix + "Create-PostgreSQL"
	CatalogCreateCassandraOp     = CatalogOpPrefix + "Create-Cassandra"
	CatalogCreateZooKeeperOp     = CatalogOpPrefix + "Create-ZooKeeper"
	CatalogCreateKafkaOp         = CatalogOpPrefix + "Create-Kafka"
	CatalogCreateKafkaSinkESOp   = CatalogOpPrefix + "Create-Kafka-SinkES"
	CatalogCreateKafkaManagerOp  = CatalogOpPrefix + "Create-Kafka-Manager"
	CatalogCreateRedisOp         = CatalogOpPrefix + "Create-Redis"
	CatalogCreateCouchDBOp       = CatalogOpPrefix + "Create-CouchDB"
	CatalogCreateConsulOp        = CatalogOpPrefix + "Create-Consul"
	CatalogCreateElasticSearchOp = CatalogOpPrefix + "Create-ElasticSearch"
	CatalogCreateKibanaOp        = CatalogOpPrefix + "Create-Kibana"
	CatalogCreateLogstashOp      = CatalogOpPrefix + "Create-Logstash"
	CatalogCreateTelegrafOp      = CatalogOpPrefix + "Create-Telegraf"
	CatalogCheckServiceInitOp    = CatalogOpPrefix + "Check-Service-Init"
	CatalogSetServiceInitOp      = CatalogOpPrefix + "Set-Service-Init"
	CatalogSetRedisInitOp        = CatalogOpPrefix + "Set-Redis-Init"
	CatalogScaleCassandraOp      = CatalogOpPrefix + "Scale-Cassandra"

	InternalOpPrefix                 = SpecialOpPrefix + "Internal-"
	InternalGetServiceTaskOp         = InternalOpPrefix + "GetServiceTask"
	InternalListActiveServiceTasksOp = InternalOpPrefix + "ListActiveServiceTasks"

	// response headers
	RequestID       = "x-RequestId"
	Server          = "Server"
	ContentType     = "Content-Type"
	JsonContentType = "application/json"
)

Variables

This section is empty.

Functions

func ConvertHTTPError

func ConvertHTTPError(resp *http.Response) error

func ConvertToHTTPError

func ConvertToHTTPError(err error) (errmsg string, errcode int)

func CreateConfigFile

func CreateConfigFile(ctx context.Context, dbIns db.DB, cfgfile *common.ConfigFile, requuid string) (*common.ConfigFile, error)

Types

type CatalogCassandraOptions added in v0.9.1

type CatalogCassandraOptions struct {
	Replicas      int64
	Volume        *common.ServiceVolume
	JournalVolume *common.ServiceVolume

	// Cassandra JVM heap size. The default volue is 8GB.
	HeapSizeMB int64
	// The user for the JMX remote access. If empty, will be set as "jmxuser".
	JmxRemoteUser string
	// The password for the JMX remote access. If empty, a uuid will be generated
	// as the password. This will be used by nodetool to access replica remotely.
	JmxRemotePasswd string
}

CatalogCassandraOptions includes the config options for Cassandra.

type CatalogCheckServiceInitRequest

type CatalogCheckServiceInitRequest struct {
	Service            *ServiceCommonRequest
	CatalogServiceType string
}

CatalogCheckServiceInitRequest checks whether one catalog service is initialized.

type CatalogCheckServiceInitResponse

type CatalogCheckServiceInitResponse struct {
	Initialized   bool
	StatusMessage string
}

CatalogCheckServiceInitResponse returns the service init status

type CatalogConsulOptions added in v0.8.1

type CatalogConsulOptions struct {
	Replicas int64
	Volume   *common.ServiceVolume

	// https://www.consul.io/docs/agent/options.html#_datacenter
	// if not specified, use the current Region.
	Datacenter string

	// https://www.consul.io/docs/agent/options.html#_domain
	Domain string

	// https://www.consul.io/docs/agent/options.html#_encrypt
	// This key must be 16-bytes that are Base64-encoded.
	Encrypt string

	// TLS configs
	EnableTLS         bool
	CertFileContent   string
	KeyFileContent    string
	CACertFileContent string
	HTTPSPort         int64
}

CatalogConsulOptions includes the config options for Consul.

type CatalogCouchDBOptions added in v0.8.1

type CatalogCouchDBOptions struct {
	Replicas int64
	Volume   *common.ServiceVolume

	// CouchDB admin username and password
	Admin       string
	AdminPasswd string

	// CouchDB Cors configs
	EnableCors  bool
	Credentials bool
	Origins     string
	Headers     string
	Methods     string

	// CouchDB SSL configs
	EnableSSL         bool
	CertFileContent   string
	KeyFileContent    string
	CACertFileContent string
}

CatalogCouchDBOptions includes the config options for CouchDB.

type CatalogCreateCassandraRequest

type CatalogCreateCassandraRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogCassandraOptions
}

CatalogCreateCassandraRequest creates a Cassandra service.

type CatalogCreateCassandraResponse added in v0.9.2

type CatalogCreateCassandraResponse struct {
	JmxRemoteUser   string
	JmxRemotePasswd string
}

CatalogCreateCassandraResponse returns the Cassandra JMX user and password.

type CatalogCreateConsulRequest added in v0.8.1

type CatalogCreateConsulRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogConsulOptions
}

CatalogCreateConsulRequest creates a Consul service.

type CatalogCreateConsulResponse added in v0.8.1

type CatalogCreateConsulResponse struct {
	ConsulServerIPs []string
}

CatalogCreateConsulResponse returns the consul server ips.

type CatalogCreateCouchDBRequest added in v0.8.1

type CatalogCreateCouchDBRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogCouchDBOptions
}

CatalogCreateCouchDBRequest creates a CouchDB service.

type CatalogCreateElasticSearchRequest added in v0.8.1

type CatalogCreateElasticSearchRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogElasticSearchOptions
}

CatalogCreateElasticSearchRequest creates an ElasticSearch service.

type CatalogCreateKafkaManagerRequest added in v0.9.4

type CatalogCreateKafkaManagerRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogKafkaManagerOptions
}

CatalogCreateKafkaManagerRequest creates a Kafka Manager service.

type CatalogCreateKafkaRequest

type CatalogCreateKafkaRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogKafkaOptions
}

CatalogCreateKafkaRequest creates a Kafka service.

type CatalogCreateKafkaResponse added in v0.9.5

type CatalogCreateKafkaResponse struct {
	JmxRemoteUser   string
	JmxRemotePasswd string
}

CatalogCreateKafkaResponse returns the Kafka JMX user and password.

type CatalogCreateKafkaSinkESRequest added in v0.9.5

type CatalogCreateKafkaSinkESRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogKafkaSinkESOptions
}

CatalogCreateKafkaSinkESRequest creates a Kafka ElasticSearch Sink Connect service.

type CatalogCreateKibanaRequest added in v0.8.1

type CatalogCreateKibanaRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogKibanaOptions
}

CatalogCreateKibanaRequest creates an Kibana service.

type CatalogCreateLogstashRequest added in v0.8.1

type CatalogCreateLogstashRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogLogstashOptions
}

CatalogCreateLogstashRequest creates a Logstash service.

type CatalogCreateMongoDBRequest

type CatalogCreateMongoDBRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogMongoDBOptions
}

CatalogCreateMongoDBRequest creates a MongoDB ReplicaSet service.

type CatalogCreateMongoDBResponse added in v0.9.1

type CatalogCreateMongoDBResponse struct {
	KeyFileContent string
}

CatalogCreateMongoDBResponse returns the keyfile content for mongos to access the sharded cluster.

type CatalogCreatePostgreSQLRequest

type CatalogCreatePostgreSQLRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogPostgreSQLOptions
}

CatalogCreatePostgreSQLRequest creates a PostgreSQL service.

type CatalogCreateRedisRequest

type CatalogCreateRedisRequest struct {
	Service *ServiceCommonRequest

	// Resources.MaxMemoryMB should always be set.
	// if cluster mode is enabled (Shards >= 3), the actual redis memory will be
	// Resources.MaxMemoryMB - default output buffer for the slaves (512MB).
	Resource *common.Resources

	Options *CatalogRedisOptions
}

CatalogCreateRedisRequest creates a Redis service.

type CatalogCreateTelegrafRequest added in v0.9.5

type CatalogCreateTelegrafRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogTelegrafOptions
}

CatalogCreateTelegrafRequest creates a Telegraf service.

type CatalogCreateZooKeeperRequest

type CatalogCreateZooKeeperRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources
	Options  *CatalogZooKeeperOptions
}

CatalogCreateZooKeeperRequest creates a ZooKeeper service.

type CatalogCreateZooKeeperResponse added in v0.9.5

type CatalogCreateZooKeeperResponse struct {
	JmxRemoteUser   string
	JmxRemotePasswd string
}

CatalogCreateZooKeeperResponse returns the ZooKeeper JMX user and password.

type CatalogElasticSearchOptions added in v0.8.1

type CatalogElasticSearchOptions struct {
	Replicas int64
	Volume   *common.ServiceVolume

	// ElasticSearch JVM heap size
	HeapSizeMB int64

	DedicatedMasters       int64
	DisableDedicatedMaster bool
	DisableForceAwareness  bool
}

CatalogElasticSearchOptions includes the config options for ElasticSearch.

type CatalogKafkaManagerOptions added in v0.9.4

type CatalogKafkaManagerOptions struct {
	// Kafka Manager JVM heap size
	HeapSizeMB int64

	// Kafka Manager user and password
	User     string
	Password string

	// The existing ZooKeeper service that Kafka Manager will use.
	ZkServiceName string
}

CatalogKafkaManagerOptions includes the options for Kafka Manager. Currently support 1 replica only.

type CatalogKafkaOptions added in v0.9.1

type CatalogKafkaOptions struct {
	Replicas int64
	Volume   *common.ServiceVolume

	// Kafka JVM heap size
	HeapSizeMB int64

	AllowTopicDel  bool
	RetentionHours int64
	// the existing ZooKeeper service that Kafka will use.
	ZkServiceName string

	JmxRemoteUser   string
	JmxRemotePasswd string
}

CatalogKafkaOptions includes the options for Kafka.

type CatalogKafkaSinkESOptions added in v0.9.5

type CatalogKafkaSinkESOptions struct {
	Replicas int64

	// Kafka Connect JVM heap size
	HeapSizeMB int64

	// The Kafka service to sink from
	KafkaServiceName string

	// The Kafka Topic to read data from
	Topic string

	// The replication factor for storage, offset and status topics
	ReplFactor uint

	// The ElasticSearch service to sink to
	ESServiceName string

	// https://docs.confluent.io/3.1.0/connect/connect-elasticsearch/docs/configuration_options.html
	// MaxBufferedRecords and BatchSize should be adjusted according to the load.
	// The ElasticSearch connector default max.buffer.records is 20000, default batch.size is 2000.
	// For example, one record is 1KB. By default, will buffer 20MB, and batch 2MB.
	MaxBufferedRecords int
	BatchSize          int

	// The ElasticSearch index type. This could not be empty for kafka elasticsearch connector.
	// The "type" is deprecated in ElasticSearch 6.0.0.
	// https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html
	// https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-type-field.html
	// https://www.elastic.co/blog/index-vs-type
	TypeName string
}

CatalogKafkaSinkESOptions includes the options for Kafka ElasticSearch Sink Connect.

type CatalogKibanaOptions added in v0.8.1

type CatalogKibanaOptions struct {
	Replicas int64
	Volume   *common.ServiceVolume

	// the ElasticSearch service that Kibana is used for
	ESServiceName string

	// specify a path to mount Kibana at if you are running behind a proxy.
	// This only affects the URLs generated by Kibana, your proxy is expected to remove the
	// basePath value before forwarding requests to Kibana. This setting cannot end in a slash (/).
	ProxyBasePath string

	EnableSSL bool
	SSLKey    string
	SSLCert   string
}

CatalogKibanaOptions includes the config options for Kibana.

type CatalogLogstashOptions added in v0.8.1

type CatalogLogstashOptions struct {
	Replicas int64
	Volume   *common.ServiceVolume

	// Logstash JVM heap size
	HeapSizeMB int64

	// The container image for the service, such as cloudstax/firecamp-logstash:version or cloudstax/firecamp-logstash-input-couchdb:version
	ContainerImage string

	// The internal queue model: "memory" or "persisted"
	QueueType             string
	EnableDeadLetterQueue bool

	// The pipeline configs.
	// There is no need to have multiple config file, as Logstash currently has a single event pipeline.
	// All configuration files are just concatenated (in order) as if you had written a single flat file.
	PipelineConfigs string

	// https://www.elastic.co/guide/en/logstash/5.6/tuning-logstash.html
	// The pipeline settings
	PipelineWorkers       int
	PipelineOutputWorkers int
	PipelineBatchSize     int
	PipelineBatchDelay    int
}

CatalogLogstashOptions includes the config options for Logstash.

type CatalogMongoDBOptions added in v0.9.1

type CatalogMongoDBOptions struct {
	// if ReplicaSetOnly == true and Shards == 1, create a single replicaset, else create a sharded cluster.
	Shards           int64
	ReplicasPerShard int64
	ReplicaSetOnly   bool
	// the number of config servers, ignored if ReplicaSetOnly == true and Shards == 1.
	ConfigServers int64

	Volume        *common.ServiceVolume
	JournalVolume *common.ServiceVolume

	Admin       string
	AdminPasswd string
}

CatalogMongoDBOptions includes the config options for MongoDB.

type CatalogPostgreSQLOptions added in v0.8.1

type CatalogPostgreSQLOptions struct {
	Replicas      int64
	Volume        *common.ServiceVolume
	JournalVolume *common.ServiceVolume

	// The container image for the service, such as cloudstax/firecamp-postgres:version or cloudstax/firecamp-postgres-postgis:version
	ContainerImage string

	// the default admin user is: postgres
	AdminPasswd    string
	ReplUser       string
	ReplUserPasswd string
}

CatalogPostgreSQLOptions includes the config options for PostgreSQL.

type CatalogRedisOptions

type CatalogRedisOptions struct {
	// The number of shards for Redis cluster, minimal 3.
	// Setting to 1 will disable cluster mode. 2 is invalid.
	Shards           int64
	ReplicasPerShard int64

	// Redis memory cache size
	MemoryCacheSizeMB int64

	Volume *common.ServiceVolume

	// whether disable Redis "append only file", not recommended unless for cache only.
	DisableAOF bool
	// The AUTH password, recommended to set it for production environment. Empty string means disable it.
	AuthPass string
	// minimal 60s, not recommend to change unless necessary. see Redis Readme for details.
	ReplTimeoutSecs int64
	// how Redis will select what to remove when maxmemory is reached
	MaxMemPolicy string
	// rename the CONFIG command
	ConfigCmdName string
}

CatalogRedisOptions includes the config options for Redis.

type CatalogScaleCassandraRequest added in v0.9.2

type CatalogScaleCassandraRequest struct {
	Service  *ServiceCommonRequest
	Replicas int64
}

CatalogScaleCassandraRequest scales the Cassandra service.

type CatalogSetRedisInitRequest

type CatalogSetRedisInitRequest struct {
	Region      string
	Cluster     string
	ServiceName string
}

CatalogSetRedisInitRequest sets the redis service initialized. This is an internal request sent from the service's init task. It should not be called directly by the application.

type CatalogSetServiceInitRequest

type CatalogSetServiceInitRequest struct {
	Region      string
	Cluster     string
	ServiceName string
	ServiceType string
}

CatalogSetServiceInitRequest sets the catalog service initialized. This is an internal request sent from the service's init task. It should not be called directly by the application.

type CatalogTelegrafOptions added in v0.9.5

type CatalogTelegrafOptions struct {
	CollectIntervalSecs int
	MonitorServiceName  string
	// The custom metrics to monitor. Leave it empty to use the default metrics for the service.
	MonitorMetrics string
}

CatalogTelegrafOptions defines the Telegraf creation options

type CatalogZooKeeperOptions added in v0.9.1

type CatalogZooKeeperOptions struct {
	Replicas int64
	Volume   *common.ServiceVolume

	// ZooKeeper JVM heap size
	HeapSizeMB int64

	// The user for the JMX remote access. If empty, will be set as "jmxuser".
	JmxRemoteUser string
	// The password for the JMX remote access. If empty, a uuid will be generated as the password.
	JmxRemotePasswd string
}

CatalogZooKeeperOptions includes the options for ZooKeeper.

type ConfigFileContent added in v0.9.6

type ConfigFileContent struct {
	FileName string
	FileMode uint32
	Content  string
}

ConfigFileContent contains the detail config file name and content.

type CreateServiceRequest

type CreateServiceRequest struct {
	Service  *ServiceCommonRequest
	Resource *common.Resources

	// ServiceType: stateful or stateless. default: stateful.
	// The empty string means stateful as this field is added after 0.9.3.
	ServiceType string

	// Catalog Service, such as Cassandra, Kafka, etc.
	CatalogServiceType string

	ContainerImage string
	Replicas       int64
	PortMappings   []common.PortMapping
	Envkvs         []*common.EnvKeyValuePair

	// whether need to register DNS
	RegisterDNS bool

	ServiceConfigs []*ConfigFileContent

	// The primary volume for the service data
	Volume *common.ServiceVolume
	// The journal volume for the service journal
	JournalVolume *common.ServiceVolume
	// TODO remove ContainerPath, as the docker entrypoint script simply uses the default path
	ContainerPath        string // The mount path inside container for the primary volume
	JournalContainerPath string // The mount path inside container for the journal volume

	// Whether the service requires static ip
	RequireStaticIP bool

	// The detail configs for each replica
	ReplicaConfigs []*ReplicaConfig
}

CreateServiceRequest contains the parameters for creating a service. Currently every replica should have its own ReplicaConfig. This aims to provide the flexibility for different services. CreateService simply returns success or not.

type DeleteServiceRequest added in v0.9.1

type DeleteServiceRequest struct {
	Service *ServiceCommonRequest
}

DeleteServiceRequest deletes the service.

type DeleteServiceResponse added in v0.9.1

type DeleteServiceResponse struct {
	VolumeIDs []string
}

DeleteServiceResponse returns the volumes of the service.

type DeleteTaskRequest

type DeleteTaskRequest struct {
	Service  *ServiceCommonRequest
	TaskType string
}

DeleteTaskRequest deletes the service task.

type GetConfigFileRequest

type GetConfigFileRequest struct {
	Region      string
	Cluster     string
	ServiceUUID string
	FileID      string
}

GetConfigFileRequest gets one config file.

type GetConfigFileResponse

type GetConfigFileResponse struct {
	ConfigFile *common.ConfigFile
}

GetConfigFileResponse rturns the config file.

type GetServiceAttributesResponse

type GetServiceAttributesResponse struct {
	Service *common.ServiceAttr
}

GetServiceAttributesResponse returns the service's attributes. GetServiceAttributesRequest just sends a "GET" with ServiceCommonRequest.

type GetServiceStatusResponse

type GetServiceStatusResponse struct {
	Status *common.ServiceStatus
}

GetServiceStatusResponse returns the service's status. GetServiceStatusRequest just sends a "GET" with ServiceCommonRequest.

type GetServiceTaskStatusResponse added in v0.9.4

type GetServiceTaskStatusResponse struct {
	Complete      bool
	StatusMessage string
}

GetServiceTaskStatusResponse returns the service management task status.

type GetTaskStatusRequest

type GetTaskStatusRequest struct {
	Service *ServiceCommonRequest
	TaskID  string
}

GetTaskStatusRequest gets the task status for the task of one service.

type GetTaskStatusResponse

type GetTaskStatusResponse struct {
	Status *common.TaskStatus
}

GetTaskStatusResponse returns the task status.

type InternalGetServiceTaskRequest

type InternalGetServiceTaskRequest struct {
	Region              string
	Cluster             string
	ServiceName         string
	ContainerInstanceID string
}

InternalGetServiceTaskRequest gets the service task from the container framework.

type InternalGetServiceTaskResponse

type InternalGetServiceTaskResponse struct {
	ServiceTaskID string
}

InternalGetServiceTaskResponse returns the service task ID.

type InternalListActiveServiceTasksRequest

type InternalListActiveServiceTasksRequest struct {
	Region      string
	Cluster     string
	ServiceName string
}

InternalListActiveServiceTasksRequest gets the service active tasks from the container framework.

type InternalListActiveServiceTasksResponse

type InternalListActiveServiceTasksResponse struct {
	ServiceTaskIDs map[string]bool
}

InternalListActiveServiceTasksResponse returns the active task IDs of the service.

type ListServiceMemberRequest

type ListServiceMemberRequest struct {
	Service *ServiceCommonRequest
}

ListServiceMemberRequest lists the serviceMembers of one service

type ListServiceMemberResponse

type ListServiceMemberResponse struct {
	ServiceMembers []*common.ServiceMember
}

ListServiceMemberResponse returns the serviceMembers of one service

type ListServiceRequest

type ListServiceRequest struct {
	// region, az and cluster are for the management service to verify
	// the request is sent to the correct server
	Region  string
	Cluster string

	// The prefix of the service name
	Prefix string
}

ListServiceRequest lists the services according to the filter. TODO change "Prefix" to the common filter.

type ListServiceResponse

type ListServiceResponse struct {
	Services []*common.ServiceAttr
}

ListServiceResponse returns all listed services' attributes.

type ReplicaConfig

type ReplicaConfig struct {
	// The availability zone this replica should run.
	Zone string
	// The replica's member name.
	MemberName string
	// The detail config files for this replica.
	Configs []*ConfigFileContent
}

ReplicaConfig contains the required config files for one replica (member).

type RunTaskRequest

type RunTaskRequest struct {
	Service        *ServiceCommonRequest
	Resource       *common.Resources
	ContainerImage string
	TaskType       string
	Envkvs         []*common.EnvKeyValuePair
}

RunTaskRequest contains the parameters to run a task.

type RunTaskResponse

type RunTaskResponse struct {
	TaskID string
}

RunTaskResponse returns the TaskID for the task.

type ServiceCommonRequest

type ServiceCommonRequest struct {
	Region      string
	Cluster     string
	ServiceName string
}

ServiceCommonRequest contains the common service parameters. region and cluster are for the management service to verify the request is sent to the correct server.

type UpdateServiceConfigRequest added in v0.9.6

type UpdateServiceConfigRequest struct {
	Service           *ServiceCommonRequest
	ConfigFileName    string
	ConfigFileContent string
}

UpdateServiceConfigRequest updates the config file of the service

type UpdateServiceResourceRequest added in v0.9.5

type UpdateServiceResourceRequest struct {
	Service         *ServiceCommonRequest
	MaxCPUUnits     *int64
	ReserveCPUUnits *int64
	MaxMemMB        *int64
	ReserveMemMB    *int64
}

UpdateServiceResourceRequest updates the service resource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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