Documentation ¶
Overview ¶
Package ppsdb contains the database schema that PPS uses.
Index ¶
- Variables
- func ClusterDefaults(db *pachsql.DB, listener col.PostgresListener) col.PostgresCollection
- func CollectionsV0() []col.PostgresCollection
- func CollectionsV2_7_0() []col.PostgresCollection
- func JobKey(j *pps.Job) string
- func Jobs(db *pachsql.DB, listener col.PostgresListener) col.PostgresCollection
- func JobsPipelineKey(p *pps.Pipeline) string
- func JobsTerminalKey(pipeline *pps.Pipeline, isTerminal bool) string
- func ParsePipelineKey(key string) (projectName, pipelineName, id string, err error)
- func Pipelines(db *pachsql.DB, listener col.PostgresListener) col.PostgresCollection
- func PipelinesNameKey(p *pps.Pipeline) string
- func VersionKey(p *pps.Pipeline, version uint64) string
- type ClusterDefaultsWrapper
- func (*ClusterDefaultsWrapper) Descriptor() ([]byte, []int)deprecated
- func (x *ClusterDefaultsWrapper) GetJson() string
- func (x *ClusterDefaultsWrapper) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (*ClusterDefaultsWrapper) ProtoMessage()
- func (x *ClusterDefaultsWrapper) ProtoReflect() protoreflect.Message
- func (x *ClusterDefaultsWrapper) Reset()
- func (x *ClusterDefaultsWrapper) String() string
Constants ¶
This section is empty.
Variables ¶
var File_internal_ppsdb_ppsdb_proto protoreflect.FileDescriptor
var JobsJobSetIndex = &col.Index{ Name: "jobset", Extract: func(val proto.Message) string { return val.(*pps.JobInfo).Job.Id }, }
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
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)) }, }
var PipelinesNameIndex = &col.Index{ Name: "name", Extract: func(val proto.Message) string { return PipelinesNameKey(val.(*pps.PipelineInfo).Pipeline) }, }
PipelinesNameIndex records the name of pipelines
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 ¶
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 ¶
func Jobs(db *pachsql.DB, listener col.PostgresListener) col.PostgresCollection
Jobs returns a PostgresCollection of Jobs
func JobsPipelineKey ¶
func ParsePipelineKey ¶
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 ¶
PipelinesNameKey returns the key used by PipelinesNameIndex to index a PipelineInfo.
func VersionKey ¶
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