Documentation
¶
Index ¶
- Constants
- type ArtifactdRepository
- type BoundAddress
- type BuildArtifact
- func (a *BuildArtifact) CreatedTime() time.Time
- func (a *BuildArtifact) DGVersion() *uint64
- func (a *BuildArtifact) ID() string
- func (a *BuildArtifact) Namespace() string
- func (a *BuildArtifact) RefIDs() []string
- func (a *BuildArtifact) URL() string
- func (a *BuildArtifact) Validate() error
- func (a *BuildArtifact) WithCreatedTime(t time.Time) mycontent.Data
- func (a *BuildArtifact) WithID(id string) mycontent.Data
- func (a *BuildArtifact) WithNamespace(id string) mycontent.Data
- func (a *BuildArtifact) WithURL(url string) mycontent.Data
- func (a *BuildArtifact) WithVersion(ver uint64) mycontent.Data
- type CancelJobRequest
- type ClickHouseStorageConfig
- type CloudflareConfig
- type ClusterConfiguration
- type ConfigureHostJob
- type ConfigureWebsiteRequest
- type ConfirmDeployment
- type ContinueDeployment
- type DeploymentJob
- func (d *DeploymentJob) CreatedTime() time.Time
- func (d *DeploymentJob) DGVersion() *uint64
- func (d *DeploymentJob) ID() string
- func (d *DeploymentJob) Namespace() string
- func (d *DeploymentJob) RefIDs() []string
- func (d *DeploymentJob) URL() string
- func (d *DeploymentJob) Validate() error
- func (d *DeploymentJob) WithCreatedTime(t time.Time) mycontent.Data
- func (d *DeploymentJob) WithID(id string) mycontent.Data
- func (d *DeploymentJob) WithNamespace(id string) mycontent.Data
- func (d *DeploymentJob) WithURL(url string) mycontent.Data
- func (d *DeploymentJob) WithVersion(ver uint64) mycontent.Data
- type DeploymentJobByService
- type DeploymentJobStatus
- type Env
- type EtcdRaftReplicaConfig
- type Host
- func (a *Host) CreatedTime() time.Time
- func (a *Host) DGVersion() *uint64
- func (a *Host) ID() string
- func (a *Host) Namespace() string
- func (a *Host) RefIDs() []string
- func (a *Host) URL() string
- func (a *Host) Validate() error
- func (a *Host) WithCreatedTime(t time.Time) mycontent.Data
- func (a *Host) WithID(id string) mycontent.Data
- func (a *Host) WithNamespace(id string) mycontent.Data
- func (a *Host) WithURL(url string) mycontent.Data
- func (a *Host) WithVersion(ver uint64) mycontent.Data
- type HostConfigurationState
- type HostConfigurationStatus
- type HostDeploymentJob
- type HostRestartServiceState
- type HostRestartServiceStatus
- type HostUpdateResult
- type JobConfigureWebsite
- func (d *JobConfigureWebsite) CreatedTime() time.Time
- func (d *JobConfigureWebsite) DGVersion() *uint64
- func (d *JobConfigureWebsite) ID() string
- func (d *JobConfigureWebsite) Namespace() string
- func (d *JobConfigureWebsite) RefIDs() []string
- func (d *JobConfigureWebsite) URL() string
- func (d *JobConfigureWebsite) Validate() error
- func (d *JobConfigureWebsite) WithCreatedTime(t time.Time) mycontent.Data
- func (d *JobConfigureWebsite) WithID(id string) mycontent.Data
- func (d *JobConfigureWebsite) WithNamespace(id string) mycontent.Data
- func (d *JobConfigureWebsite) WithURL(url string) mycontent.Data
- func (d *JobConfigureWebsite) WithVersion(ver uint64) mycontent.Data
- type JobConfigureWebsiteResultByHost
- type JobConfigureWebsiteStatus
- type KV
- func (a *KV) CreatedTime() time.Time
- func (a *KV) DGVersion() *uint64
- func (a *KV) ID() string
- func (a *KV) Namespace() string
- func (a *KV) RefIDs() []string
- func (a *KV) URL() string
- func (a *KV) Validate() error
- func (a *KV) WithCreatedTime(t time.Time) mycontent.Data
- func (a *KV) WithID(id string) mycontent.Data
- func (a *KV) WithNamespace(ns string) mycontent.Data
- func (a *KV) WithURL(url string) mycontent.Data
- func (a *KV) WithVersion(ver uint64) mycontent.Data
- type PendingUserAction
- type RaftConfig
- type RaftHost
- func (a *RaftHost) CreatedTime() time.Time
- func (a *RaftHost) DGVersion() *uint64
- func (a *RaftHost) ID() string
- func (a *RaftHost) Namespace() string
- func (a *RaftHost) RefIDs() []string
- func (a *RaftHost) URL() string
- func (a *RaftHost) Validate() error
- func (a *RaftHost) WithCreatedTime(t time.Time) mycontent.Data
- func (a *RaftHost) WithID(id string) mycontent.Data
- func (a *RaftHost) WithNamespace(id string) mycontent.Data
- func (a *RaftHost) WithURL(url string) mycontent.Data
- func (a *RaftHost) WithVersion(ver uint64) mycontent.Data
- type RaftHostConfig
- type RaftReplica
- func (a *RaftReplica) CreatedTime() time.Time
- func (a *RaftReplica) DGVersion() *uint64
- func (a *RaftReplica) ID() string
- func (a *RaftReplica) Namespace() string
- func (a *RaftReplica) RefIDs() []string
- func (a *RaftReplica) URL() string
- func (a *RaftReplica) Validate() error
- func (a *RaftReplica) WithCreatedTime(t time.Time) mycontent.Data
- func (a *RaftReplica) WithID(id string) mycontent.Data
- func (a *RaftReplica) WithNamespace(id string) mycontent.Data
- func (a *RaftReplica) WithURL(url string) mycontent.Data
- func (a *RaftReplica) WithVersion(ver uint64) mycontent.Data
- type RaftServiceConfig
- type RaftShardConfig
- type ReplicaConfig
- type Repository
- func (r *Repository) CreatedTime() time.Time
- func (a *Repository) DGVersion() *uint64
- func (r *Repository) ID() string
- func (r *Repository) Namespace() string
- func (r *Repository) RefIDs() []string
- func (r *Repository) URL() string
- func (r *Repository) Validate() error
- func (r *Repository) WithCreatedTime(t time.Time) mycontent.Data
- func (r *Repository) WithID(id string) mycontent.Data
- func (r *Repository) WithNamespace(id string) mycontent.Data
- func (r *Repository) WithURL(url string) mycontent.Data
- func (a *Repository) WithVersion(ver uint64) mycontent.Data
- type RestartServiceJob
- type Routing
- func (c *Routing) CreatedTime() time.Time
- func (a *Routing) DGVersion() *uint64
- func (c *Routing) ID() string
- func (c *Routing) Namespace() string
- func (c *Routing) RefIDs() []string
- func (c *Routing) URL() string
- func (c *Routing) Validate() error
- func (c *Routing) WithCreatedTime(t time.Time) mycontent.Data
- func (c *Routing) WithID(id string) mycontent.Data
- func (c *Routing) WithNamespace(ns string) mycontent.Data
- func (c *Routing) WithURL(url string) mycontent.Data
- func (a *Routing) WithVersion(ver uint64) mycontent.Data
- type Secret
- type ServiceDefinition
- func (a *ServiceDefinition) CreatedTime() time.Time
- func (a *ServiceDefinition) DGVersion() *uint64
- func (a *ServiceDefinition) ID() string
- func (a *ServiceDefinition) Namespace() string
- func (a *ServiceDefinition) RefIDs() []string
- func (a *ServiceDefinition) URL() string
- func (a *ServiceDefinition) Validate() error
- func (a *ServiceDefinition) WithCreatedTime(t time.Time) mycontent.Data
- func (a *ServiceDefinition) WithID(id string) mycontent.Data
- func (a *ServiceDefinition) WithNamespace(id string) mycontent.Data
- func (a *ServiceDefinition) WithURL(url string) mycontent.Data
- func (a *ServiceDefinition) WithVersion(ver uint64) mycontent.Data
- type ServiceInstanceHost
- func (a *ServiceInstanceHost) CreatedTime() time.Time
- func (a *ServiceInstanceHost) DGVersion() *uint64
- func (a *ServiceInstanceHost) ID() string
- func (a *ServiceInstanceHost) Namespace() string
- func (a *ServiceInstanceHost) RefIDs() []string
- func (a *ServiceInstanceHost) URL() string
- func (a *ServiceInstanceHost) Validate() error
- func (a *ServiceInstanceHost) WithCreatedTime(t time.Time) mycontent.Data
- func (a *ServiceInstanceHost) WithID(id string) mycontent.Data
- func (a *ServiceInstanceHost) WithNamespace(id string) mycontent.Data
- func (a *ServiceInstanceHost) WithURL(url string) mycontent.Data
- func (a *ServiceInstanceHost) WithVersion(ver uint64) mycontent.Data
- type StorageConfiguration
- type SubmitDeploymentJobRequest
Constants ¶
const ( // Overall status for the deployment job DeploymentJobStatusQueued DeploymentJobStatus = "QUEUED" DeploymentJobStatusConfiguring DeploymentJobStatus = "CONFIGURING" DeploymentJobStatusConfigured DeploymentJobStatus = "CONFIGURED" DeploymentJobStatusDeploying DeploymentJobStatus = "DEPLOYING" DeploymentJobStatusDeployed DeploymentJobStatus = "DEPLOYED" DeploymentJobStatusSuccess DeploymentJobStatus = "SUCCESS" DeploymentJobStatusCancelled DeploymentJobStatus = "CANCELLED" DeploymentJobStatusTimeOut DeploymentJobStatus = "TIMEOUT" DeploymentJobStatusFailed DeploymentJobStatus = "FAILED" // Host / worker specific configuring step status HostConfigurationStatusPending HostConfigurationStatus = "PENDING" HostConfigurationStatusConfiguring HostConfigurationStatus = "CONFIGURING" HostConfigurationStatusSuccess HostConfigurationStatus = "SUCCESS" HostConfigurationStatusFailed HostConfigurationStatus = "FAILED" HostConfigurationStatusCancelled HostConfigurationStatus = "CANCELLED" HostConfigurationStatusTimeOut HostConfigurationStatus = "TIMEOUT" // Host / worker specific deployment (restart service, routing, etc.) step status HostRestartServiceStatusPending HostRestartServiceStatus = "PENDING" HostRestartServiceStatusStarting HostRestartServiceStatus = "STARTING" // run cloudflared again HostRestartServiceStatusDrainTraffic HostRestartServiceStatus = "DRAIN_TRAFFIC" // stop cloudflared and wait; for networked service HostRestartServiceStatusRestarting HostRestartServiceStatus = "RESTARTING" // stop service, update symlink, start (systemd); for raft service HostRestartServiceStatusWaitReady HostRestartServiceStatus = "WAIT_READY" // healthcheck endpoint that includes raft get leader HostRestartServiceStatusRoutingTraffic HostRestartServiceStatus = "ROUTING_TRAFFIC" // run cloudflared again HostRestartServiceStatusSuccess HostRestartServiceStatus = "SUCCESS" HostRestartServiceStatusFailed HostRestartServiceStatus = "FAILED" HostRestartServiceStatusTimeOut HostRestartServiceStatus = "TIMEOUT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactdRepository ¶
type BoundAddress ¶
type BuildArtifact ¶
type BuildArtifact struct {
Ns string `json:"namespace" ch:"namespace"`
Id string `json:"id"`
Name string `json:"name" ch:"name"`
CommitID string `json:"commit_id" ch:"commit_id"`
Branch string `json:"branch,omitempty" ch:"branch"`
Actor string `json:"actor" ch:"actor"`
Tag string `json:"tag,omitempty" ch:"tag"`
Data json.RawMessage `json:"data" ch:"data"`
PublishedAt time.Time `json:"published_at" ch:"published_at"`
Source string `json:"source" ch:"source"`
RepositoryID string `json:"repository_id"`
URLx string `json:"url"`
OsArch []string `json:"os_arch" ch:"os_arch"`
Archive []*entity.File `json:"archive"`
}
TODO: we can make another entity that extend this, to get "BuildArtifactByBranch" ; todo: in dg
func (*BuildArtifact) CreatedTime ¶
func (a *BuildArtifact) CreatedTime() time.Time
func (*BuildArtifact) DGVersion ¶
func (a *BuildArtifact) DGVersion() *uint64
func (*BuildArtifact) ID ¶
func (a *BuildArtifact) ID() string
func (*BuildArtifact) Namespace ¶
func (a *BuildArtifact) Namespace() string
func (*BuildArtifact) RefIDs ¶
func (a *BuildArtifact) RefIDs() []string
func (*BuildArtifact) URL ¶
func (a *BuildArtifact) URL() string
func (*BuildArtifact) Validate ¶
func (a *BuildArtifact) Validate() error
func (*BuildArtifact) WithCreatedTime ¶
func (a *BuildArtifact) WithCreatedTime(t time.Time) mycontent.Data
func (*BuildArtifact) WithNamespace ¶
func (a *BuildArtifact) WithNamespace(id string) mycontent.Data
func (*BuildArtifact) WithVersion ¶
func (a *BuildArtifact) WithVersion(ver uint64) mycontent.Data
type CancelJobRequest ¶
type ClickHouseStorageConfig ¶
type ClickHouseStorageConfig struct {
Address string `json:"address"`
}
type CloudflareConfig ¶
type CloudflareConfig struct {
TunnelToken string `json:"tunnel_token"`
}
type ClusterConfiguration ¶
type ConfigureHostJob ¶
type ConfigureHostJob struct {
Status map[string]HostConfigurationState `json:"status"`
}
type ConfigureWebsiteRequest ¶ added in v0.0.3
type ConfigureWebsiteRequest struct {
// Website host name eg. example.com
WebsiteHostAddress string `json:"website_host_address"`
// artifactd repository ID
RepositoryID string `json:"repository_id"`
// build ID
BuildID string `json:"build_id"`
// Will ignore aritfactd repository ID & build id, will open from this URL instead
// Currently only support tar.gz archive.
FromUrl *string `json:"from_url,omitempty"`
// Captured host info in which the configuration will be applied
TargetHosts map[string]*Host `json:"target_hosts,omitempty"`
// <host>:<port> from target hosts
ListenAddress map[string]string `json:"listen_address,omitempty"`
Custom404Page string `json:"custom_404_page,omitempty"`
Time time.Time `json:"time,omitempty"`
}
type ConfirmDeployment ¶
type ContinueDeployment ¶
type DeploymentJob ¶
type DeploymentJob struct {
Ns string `json:"namespace"`
Id string `json:"id"` // it's a version (auto increment)
// main status / DAG
Status DeploymentJobStatus `json:"status"`
RestartServiceJob RestartServiceJob `json:"restart_service_job"`
ConfigureHostJob ConfigureHostJob `json:"configure_host_job"`
// The request; when displaying can be omitted
Request *SubmitDeploymentJobRequest `json:"request,omitempty"`
// The target host in which we will deploy our service to;
// In dragonboat lingo, this would be the Nodes, as opossed to NonVotings, Witnesses, Removed member type.
// able to be omitted for display
Target []Host `json:"target,omitempty"`
RaftConfig *RaftConfig `json:"raft_config,omitempty"`
PendingUserAction *PendingUserAction `json:"pending_user_action,omitempty"`
Url string `json:"url"`
PublishedAt time.Time `json:"published_at"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
}
func (*DeploymentJob) CreatedTime ¶
func (d *DeploymentJob) CreatedTime() time.Time
func (*DeploymentJob) DGVersion ¶
func (d *DeploymentJob) DGVersion() *uint64
func (*DeploymentJob) ID ¶
func (d *DeploymentJob) ID() string
func (*DeploymentJob) Namespace ¶
func (d *DeploymentJob) Namespace() string
func (*DeploymentJob) RefIDs ¶
func (d *DeploymentJob) RefIDs() []string
func (*DeploymentJob) URL ¶
func (d *DeploymentJob) URL() string
func (*DeploymentJob) Validate ¶
func (d *DeploymentJob) Validate() error
func (*DeploymentJob) WithCreatedTime ¶
func (d *DeploymentJob) WithCreatedTime(t time.Time) mycontent.Data
func (*DeploymentJob) WithNamespace ¶
func (d *DeploymentJob) WithNamespace(id string) mycontent.Data
func (*DeploymentJob) WithVersion ¶
func (d *DeploymentJob) WithVersion(ver uint64) mycontent.Data
type DeploymentJobByService ¶
type DeploymentJobByService struct {
*DeploymentJob
}
Limitation of DG framework; if you have an entity that can indexed many way, you need to make separate struct
func (*DeploymentJobByService) RefIDs ¶
func (d *DeploymentJobByService) RefIDs() []string
type DeploymentJobStatus ¶
type DeploymentJobStatus string
type EtcdRaftReplicaConfig ¶
type Host ¶
type Host struct {
Ns string `json:"namespace"`
Id uint32 `json:"id"`
// Hostname
Host string `json:"host"`
// internal host address for intra cluster-communication
InternalAddress string `json:"internal_address"`
Architecture string `json:"architecture"`
OS string `json:"os"`
FQDN string `json:"fqdn"`
RaftConfig RaftHostConfig `json:"raft_config"`
PublishedAt time.Time `json:"published_at"`
URLx string `json:"url"`
}
Host represents raft host configuration for a particular service
func (*Host) CreatedTime ¶
type HostConfigurationState ¶
type HostConfigurationState struct {
ErrorMessage *string `json:"error_message,omitempty"`
Status HostConfigurationStatus `json:"status"`
URL string `json:"url,omitempty"` // url with job id to stream log from
JobID string `json:"job_id,omitempty"`
}
type HostConfigurationStatus ¶
type HostConfigurationStatus string
type HostDeploymentJob ¶
type HostDeploymentJob struct {
*DeploymentJob
Status HostRestartServiceStatus `json:"status"`
}
type HostRestartServiceState ¶
type HostRestartServiceState struct {
ErrorMessage *string `json:"error_message,omitempty"`
Status HostRestartServiceStatus `json:"status"`
URL string `json:"url,omitempty"` // url with job id to stream log from
JobID string `json:"job_id,omitempty"`
}
type HostRestartServiceStatus ¶
type HostRestartServiceStatus string
type HostUpdateResult ¶ added in v0.0.3
type JobConfigureWebsite ¶ added in v0.0.3
type JobConfigureWebsite struct {
Ns string `json:"namespace"` // static: deployd
Name string `json:"name"` // static: configure-website
Id string `json:"id"` // it's a version (auto increment)
// main status / DAG
Status string `json:"status"`
Result map[string]*HostUpdateResult `json:"result"`
Request ConfigureWebsiteRequest `json:"request"`
Url string `json:"url"`
PublishedAt time.Time `json:"published_at"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
}
func (*JobConfigureWebsite) CreatedTime ¶ added in v0.0.3
func (d *JobConfigureWebsite) CreatedTime() time.Time
func (*JobConfigureWebsite) DGVersion ¶ added in v0.0.3
func (d *JobConfigureWebsite) DGVersion() *uint64
func (*JobConfigureWebsite) ID ¶ added in v0.0.3
func (d *JobConfigureWebsite) ID() string
func (*JobConfigureWebsite) Namespace ¶ added in v0.0.3
func (d *JobConfigureWebsite) Namespace() string
func (*JobConfigureWebsite) RefIDs ¶ added in v0.0.3
func (d *JobConfigureWebsite) RefIDs() []string
func (*JobConfigureWebsite) URL ¶ added in v0.0.3
func (d *JobConfigureWebsite) URL() string
func (*JobConfigureWebsite) Validate ¶ added in v0.0.3
func (d *JobConfigureWebsite) Validate() error
func (*JobConfigureWebsite) WithCreatedTime ¶ added in v0.0.3
func (d *JobConfigureWebsite) WithCreatedTime(t time.Time) mycontent.Data
func (*JobConfigureWebsite) WithID ¶ added in v0.0.3
func (d *JobConfigureWebsite) WithID(id string) mycontent.Data
func (*JobConfigureWebsite) WithNamespace ¶ added in v0.0.3
func (d *JobConfigureWebsite) WithNamespace(id string) mycontent.Data
func (*JobConfigureWebsite) WithURL ¶ added in v0.0.3
func (d *JobConfigureWebsite) WithURL(url string) mycontent.Data
func (*JobConfigureWebsite) WithVersion ¶ added in v0.0.3
func (d *JobConfigureWebsite) WithVersion(ver uint64) mycontent.Data
type JobConfigureWebsiteResultByHost ¶ added in v0.0.3
type JobConfigureWebsiteStatus ¶ added in v0.0.3
type JobConfigureWebsiteStatus string
const ( // Overall status for the deployment job JobConfigureWebsiteStatusQueued JobConfigureWebsiteStatus = "QUEUED" JobConfigureWebsiteStatusConfiguring JobConfigureWebsiteStatus = "CONFIGURING" JobConfigureWebsiteStatusConfigured JobConfigureWebsiteStatus = "CONFIGURED" JobConfigureWebsiteStatusDeploying JobConfigureWebsiteStatus = "DEPLOYING" JobConfigureWebsiteStatusDeployed JobConfigureWebsiteStatus = "DEPLOYED" JobConfigureWebsiteStatusSuccess JobConfigureWebsiteStatus = "SUCCESS" JobConfigureWebsiteStatusCancelled JobConfigureWebsiteStatus = "CANCELLED" JobConfigureWebsiteStatusTimeOut JobConfigureWebsiteStatus = "TIMEOUT" JobConfigureWebsiteStatusFailed JobConfigureWebsiteStatus = "FAILED" )
func (JobConfigureWebsiteStatus) IsTerminal ¶ added in v0.0.3
func (j JobConfigureWebsiteStatus) IsTerminal() bool
type KV ¶
type KV struct {
Ns string `json:"namespace"`
Service string `json:"service"`
Id string `json:"id"`
Version uint64 `json:"version"`
Value map[string]string `json:"value"`
PublishedAt time.Time `json:"published_at" ch:"published_at"`
URLx string `json:"url"`
}
Represents key-value pair
func (*KV) CreatedTime ¶
type PendingUserAction ¶
type PendingUserAction struct {
// after configuration finish
ConfirmDeployment *ConfirmDeployment `json:"confirm_deployment,omitempty"`
ContinueDeployment *ContinueDeployment `json:"continue_deployment,omitempty"`
}
For front end to render the CTA, if "believe"(aka.auto confirm) is not specified
type RaftConfig ¶
type RaftConfig struct {
Service map[string]RaftServiceConfig `json:"service,omitempty"` // dist
Shards map[uint64]RaftShardConfig `json:"shards,omitempty"` // dist
EtcdRaftReplicas map[string]EtcdRaftReplicaConfig `json:"etcd_raft_replicas,omitempty"`
}
type RaftHost ¶
type RaftHost struct {
Id string `json:"id,omitempty"`
Ns string `json:"namespace" ch:"namespace"`
ServiceID string `json:"service_id"`
ReplicaID uint64 `json:"replica_id"`
RaftAdress string `json:"raft_address"`
WALDir string `json:"wal_dir"`
NodeHostDir string `json:"node_host_dir"`
RTTMillisecond uint64 `json:"rtt_millisecond"`
DeploymentID uint64 `json:"deployment_id"`
PublishedAt time.Time `json:"published_at" ch:"published_at"`
URLx string `json:"url"`
}
RaftHost represents raft host configuration for a particular service
func (*RaftHost) CreatedTime ¶
type RaftHostConfig ¶
type RaftReplica ¶
type RaftReplica struct {
Id string `json:"id,omitempty"`
Ns string `json:"namespace" ch:"namespace"`
ServiceID string `json:"service_id"`
ReplicaConfig map[uint64]ReplicaConfig `json:"replica_config"`
PublishedAt time.Time `json:"published_at" ch:"published_at"`
URLx string `json:"url"`
}
RaftReplica represents raft replica configuration for a particular service
func (*RaftReplica) CreatedTime ¶
func (a *RaftReplica) CreatedTime() time.Time
func (*RaftReplica) DGVersion ¶
func (a *RaftReplica) DGVersion() *uint64
func (*RaftReplica) ID ¶
func (a *RaftReplica) ID() string
func (*RaftReplica) Namespace ¶
func (a *RaftReplica) Namespace() string
func (*RaftReplica) RefIDs ¶
func (a *RaftReplica) RefIDs() []string
func (*RaftReplica) URL ¶
func (a *RaftReplica) URL() string
func (*RaftReplica) Validate ¶
func (a *RaftReplica) Validate() error
func (*RaftReplica) WithCreatedTime ¶
func (a *RaftReplica) WithCreatedTime(t time.Time) mycontent.Data
func (*RaftReplica) WithNamespace ¶
func (a *RaftReplica) WithNamespace(id string) mycontent.Data
func (*RaftReplica) WithVersion ¶
func (a *RaftReplica) WithVersion(ver uint64) mycontent.Data
type RaftServiceConfig ¶
type RaftShardConfig ¶
type ReplicaConfig ¶
type Repository ¶
type Repository struct {
Id string `json:"id"`
Ns string `json:"namespace"`
Name string `json:"name"`
Source string `json:"source"`
Description string `json:"description"`
PublishedAt time.Time `json:"published_at"`
SourceURL string `json:"source_url"`
URLx string `json:"url"`
}
func (*Repository) CreatedTime ¶
func (r *Repository) CreatedTime() time.Time
func (*Repository) DGVersion ¶
func (a *Repository) DGVersion() *uint64
func (*Repository) ID ¶
func (r *Repository) ID() string
func (*Repository) Namespace ¶
func (r *Repository) Namespace() string
func (*Repository) RefIDs ¶
func (r *Repository) RefIDs() []string
func (*Repository) URL ¶
func (r *Repository) URL() string
func (*Repository) Validate ¶
func (r *Repository) Validate() error
func (*Repository) WithCreatedTime ¶
func (r *Repository) WithCreatedTime(t time.Time) mycontent.Data
func (*Repository) WithNamespace ¶
func (r *Repository) WithNamespace(id string) mycontent.Data
func (*Repository) WithVersion ¶
func (a *Repository) WithVersion(ver uint64) mycontent.Data
type RestartServiceJob ¶
type Routing ¶
type Routing struct {
Ns string `json:"namespace"`
Service string `json:"service"`
Id string `json:"id"`
Version uint64 `json:"version"`
CloudflareConfig *CloudflareConfig `json:"cloudflare_config,omitempty"`
PublishedAt time.Time `json:"published_at"`
URLx string `json:"url"`
}
Routing represents cloudflare config
func (*Routing) CreatedTime ¶
type Secret ¶
type Secret struct {
KV
}
Test composition, if it's awkward in the API, might need to create new struct
type ServiceDefinition ¶
type ServiceDefinition struct {
Ns string `json:"namespace"`
Id string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Repository ArtifactdRepository `json:"repository"`
ExecutablePath string `json:"executable_path"` // todo add validation
BoundAddresses []BoundAddress `json:"bound_addresses"`
PublishedAt time.Time `json:"published_at"`
URLx string `json:"url"`
}
func (*ServiceDefinition) CreatedTime ¶
func (a *ServiceDefinition) CreatedTime() time.Time
func (*ServiceDefinition) DGVersion ¶
func (a *ServiceDefinition) DGVersion() *uint64
func (*ServiceDefinition) ID ¶
func (a *ServiceDefinition) ID() string
func (*ServiceDefinition) Namespace ¶
func (a *ServiceDefinition) Namespace() string
func (*ServiceDefinition) RefIDs ¶
func (a *ServiceDefinition) RefIDs() []string
func (*ServiceDefinition) URL ¶
func (a *ServiceDefinition) URL() string
func (*ServiceDefinition) Validate ¶
func (a *ServiceDefinition) Validate() error
func (*ServiceDefinition) WithCreatedTime ¶
func (a *ServiceDefinition) WithCreatedTime(t time.Time) mycontent.Data
func (*ServiceDefinition) WithNamespace ¶
func (a *ServiceDefinition) WithNamespace(id string) mycontent.Data
func (*ServiceDefinition) WithVersion ¶
func (a *ServiceDefinition) WithVersion(ver uint64) mycontent.Data
type ServiceInstanceHost ¶
type ServiceInstanceHost struct {
Ns string `json:"namespace"`
Service string `json:"service"` // service
Host string `json:"host"` // where is this deployed, the ID
RaftConfig *RaftConfig `json:"raft_config,omitempty"`
// current on progress deployment (if any)
ActiveDeployment *HostDeploymentJob `json:"active_deployment,omitempty"`
LatestDeployment *HostDeploymentJob `json:"latest_deployment,omitempty"`
PublishedAt time.Time `json:"published_at"`
URLx string `json:"url"`
}
RaftHost represents raft host configuration for a particular service
func (*ServiceInstanceHost) CreatedTime ¶
func (a *ServiceInstanceHost) CreatedTime() time.Time
func (*ServiceInstanceHost) DGVersion ¶
func (a *ServiceInstanceHost) DGVersion() *uint64
func (*ServiceInstanceHost) ID ¶
func (a *ServiceInstanceHost) ID() string
func (*ServiceInstanceHost) Namespace ¶
func (a *ServiceInstanceHost) Namespace() string
func (*ServiceInstanceHost) RefIDs ¶
func (a *ServiceInstanceHost) RefIDs() []string
func (*ServiceInstanceHost) URL ¶
func (a *ServiceInstanceHost) URL() string
func (*ServiceInstanceHost) Validate ¶
func (a *ServiceInstanceHost) Validate() error
func (*ServiceInstanceHost) WithCreatedTime ¶
func (a *ServiceInstanceHost) WithCreatedTime(t time.Time) mycontent.Data
func (*ServiceInstanceHost) WithNamespace ¶
func (a *ServiceInstanceHost) WithNamespace(id string) mycontent.Data
func (*ServiceInstanceHost) WithURL ¶
func (a *ServiceInstanceHost) WithURL(url string) mycontent.Data
func (*ServiceInstanceHost) WithVersion ¶
func (a *ServiceInstanceHost) WithVersion(ver uint64) mycontent.Data
type StorageConfiguration ¶
type StorageConfiguration struct {
Clickhouse ClickHouseStorageConfig `json:"clickhouse"`
}
type SubmitDeploymentJobRequest ¶
type SubmitDeploymentJobRequest struct {
Ns string `json:"namespace"`
Service ServiceDefinition `json:"service"`
Id string `json:"id"`
BuildVersion uint64 `json:"build_version"`
SecretVersion uint64 `json:"secret_version"`
EnvVersion uint64 `json:"env_version"`
// optional: lookup configure cloudflare routing
RoutingVersion *uint64 `json:"routing_version,omitempty"`
// TODO: List of hosts to deploy to; for first time deployment
TargetHosts []Host `json:"target_hosts,omitempty"`
// Register (new) replica at the deployment time.
RaftShard map[uint64]RaftShardConfig `json:"raft_shard,omitempty"`
RaftPort uint16 `json:"raft_port"`
RaftPortMapping map[string]uint16 `json:"raft_port_mapping,omitempty"` // optional if at each host, the port is different
RaftDeploymentID uint64 `json:"raft_deployment_id"`
// ETCDMAXXING (todo remove this, just use replciasconfig)
EtcdRaftReplicas []string `json:"etcd_raft_replicas"` // got from user
EtcdRaftReplicasServerConfig []EtcdRaftReplicaConfig `json:"etcd_raft_replicas_server_config"` // determined
ModifyKey *string `json:"-"` // hidden; TODO: to be nice, to lock, only the one who have this key can modify the state.
TimeoutSeconds *uint32 `json:"timeout_seconds,omitempty"`
IsBelieve bool `json:"is_believe"`
Url string `json:"url"`
PublishedAt time.Time `json:"published_at"`
}