utils

package
v4.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToStatusError

func ToStatusError(err error, code codes.Code) error

Try to see if we can obtain a http error code from the k8s layer or the ArgoError layer if not we resort to a default value of `code` NOTE: errors passed of the type from grpc's status are not converted and returned as is. This is to keep user code as dumb as possible. The assumption here is that the error in the lowest layer of the error stack is the most relevant error.

Types

type ListOptions

type ListOptions struct {
	Namespace, Name              string
	NamePrefix, NameFilter       string
	MinStartedAt, MaxStartedAt   time.Time
	CreatedAfter, FinishedBefore time.Time
	LabelRequirements            labels.Requirements
	Limit, Offset                int
	ShowRemainingItemCount       bool
	StartedAtAscending           bool
}

func BuildListOptions

func BuildListOptions(options metav1.ListOptions, ns, namePrefix, nameFilter, createdAfter, finishedBefore string) (ListOptions, error)

func (ListOptions) WithLimit

func (l ListOptions) WithLimit(limit int) ListOptions

func (ListOptions) WithMaxStartedAt

func (l ListOptions) WithMaxStartedAt(maxStartedAt time.Time) ListOptions

func (ListOptions) WithMinStartedAt

func (l ListOptions) WithMinStartedAt(minStartedAt time.Time) ListOptions

func (ListOptions) WithOffset

func (l ListOptions) WithOffset(offset int) ListOptions

func (ListOptions) WithShowRemainingItemCount

func (l ListOptions) WithShowRemainingItemCount(showRemainingItemCount bool) ListOptions

func (ListOptions) WithStartedAtAscending

func (l ListOptions) WithStartedAtAscending(ascending bool) ListOptions

Jump to

Keyboard shortcuts

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