common

package module
v0.0.0-...-b1d074a Latest Latest
Warning

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

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

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 K8sClientConfig

func K8sClientConfig() (k8sConfig *rest.Config, err error)

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 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) String

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

func (*NamespacedName) UnmarshalText

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

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,omitempty"`
	Provider              string          `json:"provider"`
}

func (RunCompletionEvent) String

func (sre RunCompletionEvent) String() string

type RunCompletionStatus

type RunCompletionStatus string

Jump to

Keyboard shortcuts

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