traceflow

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequestsHandler

func NewRequestsHandler(logger logr.Logger, gcClient dynamic.Interface) *requestsHandler

Types

type Request

type Request struct {
	Object map[string]interface{}
}

type RequestsHandler

type RequestsHandler interface {
	CreateRequest(ctx context.Context, client dynamic.Interface, request *Request) (string, error)
	// GetRequestResult returns the Traceflow object, and a boolean to indicate whether the
	// Traceflow request is completed. Completed means that the Traceflow Status has either been
	// updated to "Succeeded" or "Failed".
	GetRequestResult(ctx context.Context, client dynamic.Interface, requestID string) (map[string]interface{}, bool, error)
	DeleteRequest(ctx context.Context, client dynamic.Interface, requestID string) (bool, error)
}

RequestsHandler manages the Traceflow CRs behind the UI's Traceflow page.

Every method takes the dynamic client to use, because Traceflows are created and deleted as the end user, whose credential is only known per request. The handler's own client is reserved for the background GC loop, which has no user to act as.

Directories

Path Synopsis
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

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