utils

package
v3.5.10 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 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 added in v3.5.7

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

func BuildListOptions added in v3.5.7

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

func (ListOptions) WithLimit added in v3.5.7

func (l ListOptions) WithLimit(limit int) ListOptions

func (ListOptions) WithMaxStartedAt added in v3.5.7

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

func (ListOptions) WithMinStartedAt added in v3.5.7

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

func (ListOptions) WithOffset added in v3.5.7

func (l ListOptions) WithOffset(offset int) ListOptions

func (ListOptions) WithShowRemainingItemCount added in v3.5.7

func (l ListOptions) WithShowRemainingItemCount(showRemainingItemCount bool) ListOptions

func (ListOptions) WithStartedAtAscending added in v3.5.7

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