knative

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KnativeDeployerName = "knative"
)
View Source
const RemoveTimeout = 120 * time.Second

Variables

This section is empty.

Functions

func GetKServiceLogs

func GetKServiceLogs(ctx context.Context, namespace, kServiceName, image string, since *time.Time, out io.Writer) error

GetKServiceLogs will get logs of Knative service.

It will do so by gathering logs of user-container of all affiliated pods. In addition, filtering on image can be done so only logs for given image are logged. The image must be the digest format since pods of Knative service use it.

This function runs as long as the passed context is active (i.e. it is required cancel the context to stop log gathering).

func IsCRDNotFoundError added in v0.48.0

func IsCRDNotFoundError(err error) bool

IsCRDNotFoundError checks if the given error indicates that a requested Kind could not be found and thus the CRD most likely is not installed

func NewEventingClient

func NewEventingClient(namespace string) (clienteventingv1.KnEventingClient, error)

func NewServingClient

func NewServingClient(namespace string) (clientservingv1.KnServingClient, error)

func UsesKnativeDeployer added in v0.48.0

func UsesKnativeDeployer(annotations map[string]string) bool

Types

type Deployer

type Deployer struct {
	// contains filtered or unexported fields
}

func NewDeployer

func NewDeployer(opts ...DeployerOpt) *Deployer

func (*Deployer) Deploy

func (d *Deployer) Deploy(ctx context.Context, f fn.Function) (fn.DeploymentResult, error)

type DeployerOpt

type DeployerOpt func(*Deployer)

func WithDeployerDecorator

func WithDeployerDecorator(decorator deployer.DeployDecorator) DeployerOpt

func WithDeployerVerbose

func WithDeployerVerbose(verbose bool) DeployerOpt

type Describer

type Describer struct {
	// contains filtered or unexported fields
}

func NewDescriber

func NewDescriber(verbose bool) *Describer

func (*Describer) Describe

func (d *Describer) Describe(ctx context.Context, name, namespace string) (fn.Instance, error)

Describe a function by name. Note that the consuming API uses domain style notation, whereas Kubernetes restricts to label-syntax, which is thus escaped. Therefore as a knative (kube) implementation detal proper full names have to be escaped on the way in and unescaped on the way out. ex: www.example-site.com -> www-example--site-com

type Lister

type Lister struct {
	// contains filtered or unexported fields
}

func NewLister

func NewLister(verbose bool) *Lister

func (*Lister) List

func (l *Lister) List(ctx context.Context, namespace string) ([]fn.ListItem, error)

List functions, optionally specifying a namespace.

type Remover

type Remover struct {
	// contains filtered or unexported fields
}

func NewRemover

func NewRemover(verbose bool) *Remover

func (*Remover) Remove

func (remover *Remover) Remove(ctx context.Context, name, ns string) error

Jump to

Keyboard shortcuts

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