ppsdb

package
v2.8.0-nightly.20230817 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package ppsdb contains the database schema that PPS uses.

Index

Constants

This section is empty.

Variables

View Source
var File_internal_ppsdb_ppsdb_proto protoreflect.FileDescriptor
View Source
var JobsJobSetIndex = &col.Index{
	Name: "jobset",
	Extract: func(val proto.Message) string {
		return val.(*pps.JobInfo).Job.Id
	},
}
View Source
var JobsPipelineIndex = &col.Index{
	Name: "pipeline",
	Extract: func(val proto.Message) string {
		return JobsPipelineKey(val.(*pps.JobInfo).Job.Pipeline)
	},
}

JobsPipelineIndex maps pipeline to Jobs started by the pipeline

View Source
var JobsTerminalIndex = &col.Index{
	Name: "job_state",
	Extract: func(val proto.Message) string {
		jobInfo := val.(*pps.JobInfo)
		return JobsTerminalKey(jobInfo.Job.Pipeline, pps.IsTerminal(jobInfo.State))
	},
}
View Source
var PipelinesNameIndex = &col.Index{
	Name: "name",
	Extract: func(val proto.Message) string {
		return PipelinesNameKey(val.(*pps.PipelineInfo).Pipeline)
	},
}

PipelinesNameIndex records the name of pipelines

View Source
var PipelinesVersionIndex = &col.Index{
	Name: "version",
	Extract: func(val proto.Message) string {
		info := val.(*pps.PipelineInfo)
		return VersionKey(info.Pipeline, info.Version)
	},
}

PipelinesVersionIndex records the version numbers of pipelines

Functions

func ClusterDefaults added in v2.7.0

func ClusterDefaults(db *pachsql.DB, listener col.PostgresListener) col.PostgresCollection

ClusterDefaults returns a PostgresCollection of cluster defaults. Note that this is a singleton table.

func CollectionsV0

func CollectionsV0() []col.PostgresCollection

CollectionsV0 returns a list of all the PPS API collections for postgres-initialization purposes. These collections are not usable for querying. DO NOT MODIFY THIS FUNCTION IT HAS BEEN USED IN A RELEASED MIGRATION

func CollectionsV2_7_0 added in v2.7.0

func CollectionsV2_7_0() []col.PostgresCollection

CollectionsV2_7_0 returns a list of collections for postgres-initialization purposes. These collections are not usable for querying.

DO NOT MODIFY THIS FUNCTION IT HAS BEEN USED IN A RELEASED MIGRATION

func JobKey

func JobKey(j *pps.Job) string

JobKey is a string representation of a Job suitable for use as an indexing key. It will include the project if the project name is not the empty string.

func Jobs

Jobs returns a PostgresCollection of Jobs

func JobsPipelineKey

func JobsPipelineKey(p *pps.Pipeline) string

func JobsTerminalKey

func JobsTerminalKey(pipeline *pps.Pipeline, isTerminal bool) string

func ParsePipelineKey

func ParsePipelineKey(key string) (projectName, pipelineName, id string, err error)

ParsePipelineKey expects keys to either be of the form <pipeline>@<id> or <project>/<pipeline>@<id>.

func Pipelines

func Pipelines(db *pachsql.DB, listener col.PostgresListener) col.PostgresCollection

Pipelines returns a PostgresCollection of pipelines

func PipelinesNameKey

func PipelinesNameKey(p *pps.Pipeline) string

PipelinesNameKey returns the key used by PipelinesNameIndex to index a PipelineInfo.

func VersionKey

func VersionKey(p *pps.Pipeline, version uint64) string

VersionKey return a unique key for the given project, pipeline & version. If the project is the empty string it will return an old-style key without a project; otherwise the key will include the project. The version is zero-padded in order to facilitate sorting.

Types

type ClusterDefaultsWrapper added in v2.8.0

type ClusterDefaultsWrapper struct {
	Json string `protobuf:"bytes,3,opt,name=json,proto3" json:"json,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterDefaultsWrapper) Descriptor deprecated added in v2.8.0

func (*ClusterDefaultsWrapper) Descriptor() ([]byte, []int)

Deprecated: Use ClusterDefaultsWrapper.ProtoReflect.Descriptor instead.

func (*ClusterDefaultsWrapper) GetJson added in v2.8.0

func (x *ClusterDefaultsWrapper) GetJson() string

func (*ClusterDefaultsWrapper) MarshalLogObject added in v2.8.0

func (x *ClusterDefaultsWrapper) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*ClusterDefaultsWrapper) ProtoMessage added in v2.8.0

func (*ClusterDefaultsWrapper) ProtoMessage()

func (*ClusterDefaultsWrapper) ProtoReflect added in v2.8.0

func (x *ClusterDefaultsWrapper) ProtoReflect() protoreflect.Message

func (*ClusterDefaultsWrapper) Reset added in v2.8.0

func (x *ClusterDefaultsWrapper) Reset()

func (*ClusterDefaultsWrapper) String added in v2.8.0

func (x *ClusterDefaultsWrapper) String() string

Jump to

Keyboard shortcuts

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