common

package module
v0.0.0-...-5ef0b63 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: BSD-3-Clause Imports: 7 Imported by: 12

Documentation

Index

Constants

View Source
const RunCompletionEventName = "run-completion"

Variables

View Source
var RunCompletionStatuses = struct {
	Succeeded RunCompletionStatus
	Failed    RunCompletionStatus
}{
	Succeeded: "succeeded",
	Failed:    "failed",
}

Functions

func LoggerFromContext

func LoggerFromContext(ctx context.Context) logr.Logger

func NewLogger

func NewLogger(logLevel zapcore.Level) (logr.Logger, error)

Types

type Artifact

type Artifact struct {
	Name     string `json:"name"`
	Location string `json:"location"`
}

type ComponentArtifact

type ComponentArtifact struct {
	Name      string                      `json:"name"`
	Artifacts []ComponentArtifactInstance `json:"artifacts"`
}

type ComponentArtifactInstance

type ComponentArtifactInstance struct {
	Uri      string                 `json:"uri"`
	Metadata map[string]interface{} `json:"metadata"`
}

type NamespacedName

type NamespacedName struct {
	Name      string `json:"-" yaml:"-"`
	Namespace string `json:"-" yaml:"-"`
}

func NamespacedNameFromString

func NamespacedNameFromString(namespacedName string) (NamespacedName, error)

func (NamespacedName) Empty

func (nsn NamespacedName) Empty() bool

func (NamespacedName) MarshalText

func (nsn NamespacedName) MarshalText() ([]byte, error)

func (NamespacedName) NonEmptyPtr

func (nsn NamespacedName) NonEmptyPtr() *NamespacedName

Optionally render structs until https://github.com/golang/go/issues/11939 is addressed

func (NamespacedName) SeparatedString

func (nsn NamespacedName) SeparatedString(separator string) (string, error)

func (NamespacedName) String

func (nsn NamespacedName) String() (string, error)

func (*NamespacedName) UnmarshalText

func (nsn *NamespacedName) UnmarshalText(bytes []byte) error

type PipelineComponent

type PipelineComponent struct {
	Name               string              `json:"name"`
	ComponentArtifacts []ComponentArtifact `json:"componentArtifacts"`
}

type RunCompletionEvent

type RunCompletionEvent struct {
	Status       RunCompletionStatus `json:"status"`
	PipelineName NamespacedName      `json:"pipelineName"`
	// Optionally render structs until https://github.com/golang/go/issues/11939 is addressed
	RunConfigurationName  *NamespacedName `json:"runConfigurationName,omitempty"`
	RunName               *NamespacedName `json:"runName,omitempty"`
	RunId                 string          `json:"runId"`
	ServingModelArtifacts []Artifact      `json:"servingModelArtifacts"`
	Artifacts             []Artifact      `json:"artifacts"`
	Provider              string          `json:"provider"`
}

func (RunCompletionEvent) String

func (sre RunCompletionEvent) String() string

type RunCompletionEventData

type RunCompletionEventData struct {
	Status       RunCompletionStatus `json:"status"`
	PipelineName NamespacedName      `json:"pipelineName"`
	// Optionally render structs until https://github.com/golang/go/issues/11939 is addressed
	RunConfigurationName  *NamespacedName     `json:"runConfigurationName,omitempty"`
	RunName               *NamespacedName     `json:"runName,omitempty"`
	RunId                 string              `json:"runId"`
	ServingModelArtifacts []Artifact          `json:"servingModelArtifacts"`
	PipelineComponents    []PipelineComponent `json:"pipelineComponents"`
	Provider              string              `json:"provider"`
}

func (RunCompletionEventData) ToRunCompletionEvent

func (rced RunCompletionEventData) ToRunCompletionEvent() RunCompletionEvent

type RunCompletionStatus

type RunCompletionStatus string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳