tektoncd

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TektonClient

type TektonClient interface {
	// WatchTasks watches all tasks inside a namespace.
	WatchTasks(ctx context.Context, namespace string) (<-chan watch.Event, error)
	// WatchTask watches a task.
	WatchTask(ctx context.Context, task *tektonAPI.Task, id uuid.UUID) (<-chan watch.Event, error)
	// SetTaskLabels sets the labels of a task.
	SetTaskLabels(ctx context.Context, task *tektonAPI.Task, labels map[string]string) error
	// GetTaskRun returns a task run by name.
	GetTaskRun(ctx context.Context, namespace string, id uuid.UUID) (*tektonAPI.TaskRun, error)
	// RunTask runs a task.
	RunTaskRun(ctx context.Context, taskRun *tektonAPI.TaskRun) error
	// WatchTaskRun watches a task run.
	WatchTaskRun(ctx context.Context, taskRun *tektonAPI.TaskRun, id uuid.UUID) (<-chan watch.Event, error)
	// GetTaskRunLogs returns a stream of logs for a task run.
	GetTaskRunLogs(ctx context.Context, taskRun *tektonAPI.TaskRun) (map[string]string, error)
}

TektonClient is a client for interacting with Tekton.

func NewTektonClient

func NewTektonClient() (TektonClient, error)

NewTektonClient creates a new TektonClient.

type TektonClientImpl

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

func (*TektonClientImpl) GetTaskRun

func (c *TektonClientImpl) GetTaskRun(ctx context.Context, namespace string, id uuid.UUID) (*tektonAPI.TaskRun, error)

GetTaskRun returns a task run by ID.

func (*TektonClientImpl) GetTaskRunLogs

func (c *TektonClientImpl) GetTaskRunLogs(ctx context.Context, taskRun *tektonAPI.TaskRun) (map[string]string, error)

func (*TektonClientImpl) Logs

func (c *TektonClientImpl) Logs(ctx context.Context, taskRun *tektonAPI.TaskRun) (map[string]string, error)

Logs returns the logs of a task run.

func (*TektonClientImpl) RunTaskRun

func (c *TektonClientImpl) RunTaskRun(ctx context.Context, taskRun *tektonAPI.TaskRun) error

func (*TektonClientImpl) SetTaskLabels added in v0.5.0

func (c *TektonClientImpl) SetTaskLabels(ctx context.Context, task *tektonAPI.Task, labels map[string]string) error

SetTaskLabels sets the labels of a task.

func (*TektonClientImpl) WatchTask added in v0.5.0

func (c *TektonClientImpl) WatchTask(ctx context.Context, task *tektonAPI.Task, id uuid.UUID) (<-chan watch.Event, error)

WatchTask watches a task.

func (*TektonClientImpl) WatchTaskRun

func (c *TektonClientImpl) WatchTaskRun(ctx context.Context, taskRun *tektonAPI.TaskRun, id uuid.UUID) (<-chan watch.Event, error)

func (*TektonClientImpl) WatchTasks added in v0.5.0

func (c *TektonClientImpl) WatchTasks(ctx context.Context, namespace string) (<-chan watch.Event, error)

WatchTasks watches all tasks inside a namespace.

Jump to

Keyboard shortcuts

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