Documentation
¶
Index ¶
- Constants
- Variables
- func MigrateAppVersionConcurrency(ctx context.Context, log *slog.Logger, ...) error
- type App
- func (o *App) Decode(e entity.AttrGetter)
- func (o *App) Empty() bool
- func (o *App) Encode() (attrs []entity.Attr)
- func (o *App) EntityId() entity.Id
- func (o *App) InitSchema(sb *schema.SchemaBuilder)
- func (o *App) Is(e entity.AttrGetter) bool
- func (o *App) Kind() entity.Id
- func (o *App) ShortKind() string
- type AppVersion
- func (o *AppVersion) Decode(e entity.AttrGetter)
- func (o *AppVersion) Empty() bool
- func (o *AppVersion) Encode() (attrs []entity.Attr)
- func (o *AppVersion) EntityId() entity.Id
- func (o *AppVersion) InitSchema(sb *schema.SchemaBuilder)
- func (o *AppVersion) Is(e entity.AttrGetter) bool
- func (o *AppVersion) Kind() entity.Id
- func (o *AppVersion) ShortKind() string
- type Artifact
- func (o *Artifact) Decode(e entity.AttrGetter)
- func (o *Artifact) Empty() bool
- func (o *Artifact) Encode() (attrs []entity.Attr)
- func (o *Artifact) EntityId() entity.Id
- func (o *Artifact) InitSchema(sb *schema.SchemaBuilder)
- func (o *Artifact) Is(e entity.AttrGetter) bool
- func (o *Artifact) Kind() entity.Id
- func (o *Artifact) ShortKind() string
- type Commands
- type Config
- type DeployedBy
- type Deployment
- func (o *Deployment) Decode(e entity.AttrGetter)
- func (o *Deployment) Empty() bool
- func (o *Deployment) Encode() (attrs []entity.Attr)
- func (o *Deployment) EntityId() entity.Id
- func (o *Deployment) InitSchema(sb *schema.SchemaBuilder)
- func (o *Deployment) Is(e entity.AttrGetter) bool
- func (o *Deployment) Kind() entity.Id
- func (o *Deployment) ShortKind() string
- type Disks
- type Env
- type GitInfo
- type Metadata
- func (o *Metadata) Decode(e entity.AttrGetter)
- func (o *Metadata) Empty() bool
- func (o *Metadata) Encode() (attrs []entity.Attr)
- func (o *Metadata) EntityId() entity.Id
- func (o *Metadata) InitSchema(sb *schema.SchemaBuilder)
- func (o *Metadata) Is(e entity.AttrGetter) bool
- func (o *Metadata) Kind() entity.Id
- func (o *Metadata) ShortKind() string
- type Project
- func (o *Project) Decode(e entity.AttrGetter)
- func (o *Project) Empty() bool
- func (o *Project) Encode() (attrs []entity.Attr)
- func (o *Project) EntityId() entity.Id
- func (o *Project) InitSchema(sb *schema.SchemaBuilder)
- func (o *Project) Is(e entity.AttrGetter) bool
- func (o *Project) Kind() entity.Id
- func (o *Project) ShortKind() string
- type ServiceConcurrency
- type Services
- type Variable
Constants ¶
View Source
const ( AppActiveVersionId = entity.Id("dev.miren.core/app.active_version") AppProjectId = entity.Id("dev.miren.core/app.project") )
View Source
const ( AppVersionAppId = entity.Id("dev.miren.core/app_version.app") AppVersionArtifactId = entity.Id("dev.miren.core/app_version.artifact") AppVersionConfigId = entity.Id("dev.miren.core/app_version.config") AppVersionImageUrlId = entity.Id("dev.miren.core/app_version.image_url") AppVersionManifestId = entity.Id("dev.miren.core/app_version.manifest") AppVersionManifestDigestId = entity.Id("dev.miren.core/app_version.manifest_digest") AppVersionVersionId = entity.Id("dev.miren.core/app_version.version") )
View Source
const ( ConfigCommandsId = entity.Id("dev.miren.core/config.commands") ConfigEntrypointId = entity.Id("dev.miren.core/config.entrypoint") ConfigPortId = entity.Id("dev.miren.core/config.port") ConfigServicesId = entity.Id("dev.miren.core/config.services") ConfigStartDirectoryId = entity.Id("dev.miren.core/config.start_directory") ConfigVariableId = entity.Id("dev.miren.core/config.variable") )
View Source
const ( CommandsCommandId = entity.Id("dev.miren.core/commands.command") CommandsServiceId = entity.Id("dev.miren.core/commands.service") )
View Source
const ( ServicesDisksId = entity.Id("dev.miren.core/services.disks") ServicesEnvId = entity.Id("dev.miren.core/services.env") ServicesImageId = entity.Id("dev.miren.core/services.image") ServicesNameId = entity.Id("dev.miren.core/services.name") ServicesPortId = entity.Id("dev.miren.core/services.port") ServicesPortNameId = entity.Id("dev.miren.core/services.port_name") ServicesPortTypeId = entity.Id("dev.miren.core/services.port_type") ServicesServiceConcurrencyId = entity.Id("dev.miren.core/services.service_concurrency") )
View Source
const ( DisksFilesystemId = entity.Id("dev.miren.core/disks.filesystem") DisksLeaseTimeoutId = entity.Id("dev.miren.core/disks.lease_timeout") DisksMountPathId = entity.Id("dev.miren.core/disks.mount_path") DisksNameId = entity.Id("dev.miren.core/disks.name") DisksReadOnlyId = entity.Id("dev.miren.core/disks.read_only") DisksSizeGbId = entity.Id("dev.miren.core/disks.size_gb") )
View Source
const ( EnvKeyId = entity.Id("dev.miren.core/env.key") EnvSensitiveId = entity.Id("dev.miren.core/env.sensitive") EnvSourceId = entity.Id("dev.miren.core/env.source") EnvValueId = entity.Id("dev.miren.core/env.value") )
View Source
const ( ServiceConcurrencyModeId = entity.Id("dev.miren.core/service_concurrency.mode") ServiceConcurrencyNumInstancesId = entity.Id("dev.miren.core/service_concurrency.num_instances") ServiceConcurrencyRequestsPerInstanceId = entity.Id("dev.miren.core/service_concurrency.requests_per_instance") ServiceConcurrencyScaleDownDelayId = entity.Id("dev.miren.core/service_concurrency.scale_down_delay") )
View Source
const ( VariableKeyId = entity.Id("dev.miren.core/variable.key") VariableSensitiveId = entity.Id("dev.miren.core/variable.sensitive") VariableSourceId = entity.Id("dev.miren.core/variable.source") VariableValueId = entity.Id("dev.miren.core/variable.value") )
View Source
const ( ArtifactAppId = entity.Id("dev.miren.core/artifact.app") ArtifactManifestId = entity.Id("dev.miren.core/artifact.manifest") ArtifactManifestDigestId = entity.Id("dev.miren.core/artifact.manifest_digest") )
View Source
const ( DeploymentAppNameId = entity.Id("dev.miren.core/deployment.app_name") DeploymentAppVersionId = entity.Id("dev.miren.core/deployment.app_version") DeploymentBuildLogsId = entity.Id("dev.miren.core/deployment.build_logs") DeploymentClusterIdId = entity.Id("dev.miren.core/deployment.cluster_id") DeploymentCompletedAtId = entity.Id("dev.miren.core/deployment.completed_at") DeploymentDeployedById = entity.Id("dev.miren.core/deployment.deployed_by") DeploymentErrorMessageId = entity.Id("dev.miren.core/deployment.error_message") DeploymentGitInfoId = entity.Id("dev.miren.core/deployment.git_info") DeploymentPhaseId = entity.Id("dev.miren.core/deployment.phase") DeploymentStatusId = entity.Id("dev.miren.core/deployment.status") )
View Source
const ( DeployedByTimestampId = entity.Id("dev.miren.core/deployed_by.timestamp") DeployedByUserEmailId = entity.Id("dev.miren.core/deployed_by.user_email") DeployedByUserIdId = entity.Id("dev.miren.core/deployed_by.user_id") DeployedByUserNameId = entity.Id("dev.miren.core/deployed_by.user_name") )
View Source
const ( GitInfoAuthorId = entity.Id("dev.miren.core/git_info.author") GitInfoBranchId = entity.Id("dev.miren.core/git_info.branch") GitInfoCommitAuthorEmailId = entity.Id("dev.miren.core/git_info.commit_author_email") GitInfoCommitTimestampId = entity.Id("dev.miren.core/git_info.commit_timestamp") GitInfoIsDirtyId = entity.Id("dev.miren.core/git_info.is_dirty") GitInfoMessageId = entity.Id("dev.miren.core/git_info.message") GitInfoRepositoryId = entity.Id("dev.miren.core/git_info.repository") GitInfoShaId = entity.Id("dev.miren.core/git_info.sha") GitInfoWorkingTreeHashId = entity.Id("dev.miren.core/git_info.working_tree_hash") )
View Source
const ( MetadataLabelsId = entity.Id("dev.miren.core/metadata.labels") MetadataNameId = entity.Id("dev.miren.core/metadata.name") MetadataProjectId = entity.Id("dev.miren.core/metadata.project") )
View Source
const (
ProjectOwnerId = entity.Id("dev.miren.core/project.owner")
)
Variables ¶
View Source
var ( KindApp = entity.Id("dev.miren.core/kind.app") KindAppVersion = entity.Id("dev.miren.core/kind.app_version") KindArtifact = entity.Id("dev.miren.core/kind.artifact") KindDeployment = entity.Id("dev.miren.core/kind.deployment") KindMetadata = entity.Id("dev.miren.core/kind.metadata") KindProject = entity.Id("dev.miren.core/kind.project") Schema = entity.Id("dev.miren.core/schema.v1alpha") )
Functions ¶
func MigrateAppVersionConcurrency ¶
func MigrateAppVersionConcurrency(ctx context.Context, log *slog.Logger, eac *entityserver_v1alpha.EntityAccessClient) error
MigrateAppVersionConcurrency backfills missing service_concurrency config for all app versions using the same defaults applied at build time.
Types ¶
type App ¶
type App struct {
ID entity.Id `json:"id"`
ActiveVersion entity.Id `cbor:"active_version,omitempty" json:"active_version,omitempty"`
Project entity.Id `cbor:"project,omitempty" json:"project,omitempty"`
}
func (*App) Decode ¶
func (o *App) Decode(e entity.AttrGetter)
func (*App) InitSchema ¶
func (o *App) InitSchema(sb *schema.SchemaBuilder)
type AppVersion ¶
type AppVersion struct {
ID entity.Id `json:"id"`
App entity.Id `cbor:"app,omitempty" json:"app,omitempty"`
Artifact entity.Id `cbor:"artifact,omitempty" json:"artifact,omitempty"`
Config Config `cbor:"config,omitempty" json:"config,omitempty"`
ImageUrl string `cbor:"image_url,omitempty" json:"image_url,omitempty"`
Manifest string `cbor:"manifest,omitempty" json:"manifest,omitempty"`
ManifestDigest string `cbor:"manifest_digest,omitempty" json:"manifest_digest,omitempty"`
Version string `cbor:"version,omitempty" json:"version,omitempty"`
}
func (*AppVersion) Decode ¶
func (o *AppVersion) Decode(e entity.AttrGetter)
func (*AppVersion) Empty ¶
func (o *AppVersion) Empty() bool
func (*AppVersion) Encode ¶
func (o *AppVersion) Encode() (attrs []entity.Attr)
func (*AppVersion) EntityId ¶
func (o *AppVersion) EntityId() entity.Id
func (*AppVersion) InitSchema ¶
func (o *AppVersion) InitSchema(sb *schema.SchemaBuilder)
func (*AppVersion) Is ¶
func (o *AppVersion) Is(e entity.AttrGetter) bool
func (*AppVersion) Kind ¶
func (o *AppVersion) Kind() entity.Id
func (*AppVersion) ShortKind ¶
func (o *AppVersion) ShortKind() string
type Artifact ¶
type Artifact struct {
ID entity.Id `json:"id"`
App entity.Id `cbor:"app,omitempty" json:"app,omitempty"`
Manifest string `cbor:"manifest,omitempty" json:"manifest,omitempty"`
ManifestDigest string `cbor:"manifest_digest,omitempty" json:"manifest_digest,omitempty"`
}
func (*Artifact) Decode ¶
func (o *Artifact) Decode(e entity.AttrGetter)
func (*Artifact) InitSchema ¶
func (o *Artifact) InitSchema(sb *schema.SchemaBuilder)
type Commands ¶
type Commands struct {
Command string `cbor:"command,omitempty" json:"command,omitempty"`
Service string `cbor:"service,omitempty" json:"service,omitempty"`
}
func (*Commands) Decode ¶
func (o *Commands) Decode(e entity.AttrGetter)
func (*Commands) InitSchema ¶
func (o *Commands) InitSchema(sb *schema.SchemaBuilder)
type Config ¶
type Config struct {
Commands []Commands `cbor:"commands,omitempty" json:"commands,omitempty"`
Entrypoint string `cbor:"entrypoint,omitempty" json:"entrypoint,omitempty"`
Port int64 `cbor:"port,omitempty" json:"port,omitempty"`
Services []Services `cbor:"services,omitempty" json:"services,omitempty"`
StartDirectory string `cbor:"start_directory,omitempty" json:"start_directory,omitempty"`
Variable []Variable `cbor:"variable,omitempty" json:"variable,omitempty"`
}
func (*Config) Decode ¶
func (o *Config) Decode(e entity.AttrGetter)
func (*Config) InitSchema ¶
func (o *Config) InitSchema(sb *schema.SchemaBuilder)
type DeployedBy ¶
type DeployedBy struct {
Timestamp string `cbor:"timestamp,omitempty" json:"timestamp,omitempty"`
UserEmail string `cbor:"user_email,omitempty" json:"user_email,omitempty"`
UserId string `cbor:"user_id,omitempty" json:"user_id,omitempty"`
UserName string `cbor:"user_name,omitempty" json:"user_name,omitempty"`
}
func (*DeployedBy) Decode ¶
func (o *DeployedBy) Decode(e entity.AttrGetter)
func (*DeployedBy) Empty ¶
func (o *DeployedBy) Empty() bool
func (*DeployedBy) Encode ¶
func (o *DeployedBy) Encode() (attrs []entity.Attr)
func (*DeployedBy) InitSchema ¶
func (o *DeployedBy) InitSchema(sb *schema.SchemaBuilder)
type Deployment ¶
type Deployment struct {
ID entity.Id `json:"id"`
AppName string `cbor:"app_name,omitempty" json:"app_name,omitempty"`
AppVersion string `cbor:"app_version,omitempty" json:"app_version,omitempty"`
BuildLogs string `cbor:"build_logs,omitempty" json:"build_logs,omitempty"`
ClusterId string `cbor:"cluster_id,omitempty" json:"cluster_id,omitempty"`
CompletedAt string `cbor:"completed_at,omitempty" json:"completed_at,omitempty"`
DeployedBy DeployedBy `cbor:"deployed_by,omitempty" json:"deployed_by,omitempty"`
ErrorMessage string `cbor:"error_message,omitempty" json:"error_message,omitempty"`
GitInfo GitInfo `cbor:"git_info,omitempty" json:"git_info,omitempty"`
Phase string `cbor:"phase,omitempty" json:"phase,omitempty"`
Status string `cbor:"status,omitempty" json:"status,omitempty"`
}
func (*Deployment) Decode ¶
func (o *Deployment) Decode(e entity.AttrGetter)
func (*Deployment) Empty ¶
func (o *Deployment) Empty() bool
func (*Deployment) Encode ¶
func (o *Deployment) Encode() (attrs []entity.Attr)
func (*Deployment) EntityId ¶
func (o *Deployment) EntityId() entity.Id
func (*Deployment) InitSchema ¶
func (o *Deployment) InitSchema(sb *schema.SchemaBuilder)
func (*Deployment) Is ¶
func (o *Deployment) Is(e entity.AttrGetter) bool
func (*Deployment) Kind ¶
func (o *Deployment) Kind() entity.Id
func (*Deployment) ShortKind ¶
func (o *Deployment) ShortKind() string
type Disks ¶
type Disks struct {
Filesystem string `cbor:"filesystem,omitempty" json:"filesystem,omitempty"`
LeaseTimeout string `cbor:"lease_timeout,omitempty" json:"lease_timeout,omitempty"`
MountPath string `cbor:"mount_path,omitempty" json:"mount_path,omitempty"`
Name string `cbor:"name,omitempty" json:"name,omitempty"`
ReadOnly bool `cbor:"read_only,omitempty" json:"read_only,omitempty"`
SizeGb int64 `cbor:"size_gb,omitempty" json:"size_gb,omitempty"`
}
func (*Disks) Decode ¶
func (o *Disks) Decode(e entity.AttrGetter)
func (*Disks) InitSchema ¶
func (o *Disks) InitSchema(sb *schema.SchemaBuilder)
type Env ¶
type Env struct {
Key string `cbor:"key,omitempty" json:"key,omitempty"`
Sensitive bool `cbor:"sensitive,omitempty" json:"sensitive,omitempty"`
Source string `cbor:"source,omitempty" json:"source,omitempty"`
Value string `cbor:"value,omitempty" json:"value,omitempty"`
}
func (*Env) Decode ¶
func (o *Env) Decode(e entity.AttrGetter)
func (*Env) InitSchema ¶
func (o *Env) InitSchema(sb *schema.SchemaBuilder)
type GitInfo ¶
type GitInfo struct {
Author string `cbor:"author,omitempty" json:"author,omitempty"`
Branch string `cbor:"branch,omitempty" json:"branch,omitempty"`
CommitAuthorEmail string `cbor:"commit_author_email,omitempty" json:"commit_author_email,omitempty"`
CommitTimestamp string `cbor:"commit_timestamp,omitempty" json:"commit_timestamp,omitempty"`
IsDirty bool `cbor:"is_dirty,omitempty" json:"is_dirty,omitempty"`
Message string `cbor:"message,omitempty" json:"message,omitempty"`
Repository string `cbor:"repository,omitempty" json:"repository,omitempty"`
Sha string `cbor:"sha,omitempty" json:"sha,omitempty"`
WorkingTreeHash string `cbor:"working_tree_hash,omitempty" json:"working_tree_hash,omitempty"`
}
func (*GitInfo) Decode ¶
func (o *GitInfo) Decode(e entity.AttrGetter)
func (*GitInfo) InitSchema ¶
func (o *GitInfo) InitSchema(sb *schema.SchemaBuilder)
type Metadata ¶
type Metadata struct {
ID entity.Id `json:"id"`
Labels types.Labels `cbor:"labels,omitempty" json:"labels,omitempty"`
Name string `cbor:"name,omitempty" json:"name,omitempty"`
Project entity.Id `cbor:"project,omitempty" json:"project,omitempty"`
}
func MD ¶
func MD(ea entity.AttrGetter) Metadata
func (*Metadata) Decode ¶
func (o *Metadata) Decode(e entity.AttrGetter)
func (*Metadata) InitSchema ¶
func (o *Metadata) InitSchema(sb *schema.SchemaBuilder)
type Project ¶
type Project struct {
ID entity.Id `json:"id"`
Owner string `cbor:"owner,omitempty" json:"owner,omitempty"`
}
func (*Project) Decode ¶
func (o *Project) Decode(e entity.AttrGetter)
func (*Project) InitSchema ¶
func (o *Project) InitSchema(sb *schema.SchemaBuilder)
type ServiceConcurrency ¶
type ServiceConcurrency struct {
Mode string `cbor:"mode,omitempty" json:"mode,omitempty"`
NumInstances int64 `cbor:"num_instances,omitempty" json:"num_instances,omitempty"`
RequestsPerInstance int64 `cbor:"requests_per_instance,omitempty" json:"requests_per_instance,omitempty"`
ScaleDownDelay string `cbor:"scale_down_delay,omitempty" json:"scale_down_delay,omitempty"`
}
func GetServiceConcurrency ¶
func GetServiceConcurrency(ver *AppVersion, serviceName string) (ServiceConcurrency, error)
GetServiceConcurrency returns the concurrency configuration for a named service. Returns an error if the service is not found - all service configs should be hydrated with defaults during app version creation.
func (*ServiceConcurrency) Decode ¶
func (o *ServiceConcurrency) Decode(e entity.AttrGetter)
func (*ServiceConcurrency) Empty ¶
func (o *ServiceConcurrency) Empty() bool
func (*ServiceConcurrency) Encode ¶
func (o *ServiceConcurrency) Encode() (attrs []entity.Attr)
func (*ServiceConcurrency) InitSchema ¶
func (o *ServiceConcurrency) InitSchema(sb *schema.SchemaBuilder)
type Services ¶
type Services struct {
Disks []Disks `cbor:"disks,omitempty" json:"disks,omitempty"`
Env []Env `cbor:"env,omitempty" json:"env,omitempty"`
Image string `cbor:"image,omitempty" json:"image,omitempty"`
Name string `cbor:"name,omitempty" json:"name,omitempty"`
Port int64 `cbor:"port,omitempty" json:"port,omitempty"`
PortName string `cbor:"port_name,omitempty" json:"port_name,omitempty"`
PortType string `cbor:"port_type,omitempty" json:"port_type,omitempty"`
ServiceConcurrency ServiceConcurrency `cbor:"service_concurrency,omitempty" json:"service_concurrency,omitempty"`
}
func (*Services) Decode ¶
func (o *Services) Decode(e entity.AttrGetter)
func (*Services) InitSchema ¶
func (o *Services) InitSchema(sb *schema.SchemaBuilder)
type Variable ¶
type Variable struct {
Key string `cbor:"key,omitempty" json:"key,omitempty"`
Sensitive bool `cbor:"sensitive,omitempty" json:"sensitive,omitempty"`
Source string `cbor:"source,omitempty" json:"source,omitempty"`
Value string `cbor:"value,omitempty" json:"value,omitempty"`
}
func (*Variable) Decode ¶
func (o *Variable) Decode(e entity.AttrGetter)
func (*Variable) InitSchema ¶
func (o *Variable) InitSchema(sb *schema.SchemaBuilder)
Click to show internal directories.
Click to hide internal directories.