opms

package
v0.0.0-...-a4b29c3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	DequeueTask(ctx context.Context) (*types.Task, error)
	PublishSuccess(
		ctx context.Context,
		client actionsclientpb.Client,
		taskID string,
		jobID string,
		actionFQN string,
		output interface{},
		branch string,
	) error
	PublishFailure(
		ctx context.Context,
		client actionsclientpb.Client,
		taskID string,
		jobID string,
		actionFQN string,
		errorCode aperrorpb.ActionPlatformErrorCode,
		errorDetails string,
		apiError string,
	) error
	HealthCheck(ctx context.Context) (*HealthCheckData, error)
	Heartbeat(ctx context.Context, client actionsclientpb.Client, taskID, actionFQN, jobID string) error
}

Client is the OPMS client interface Enrollment is intentionally omitted from this OPMS interface as the client requires a config. Ensure enrollment is completed before instantiating this client.

func NewClient

func NewClient(cfg *config.Config) Client

type HealthCheckData

type HealthCheckData struct {
	ServerTime *time.Time `json:"server_time,omitempty"`
}

type HeartbeatJSONData

type HeartbeatJSONData struct {
	Type       string                          `json:"type,omitempty"`
	ID         string                          `json:"id,omitempty"`
	Attributes *HeartbeatJSONRequestAttributes `json:"attributes,omitempty"`
}

type HeartbeatJSONRequest

type HeartbeatJSONRequest struct {
	Data *HeartbeatJSONData `json:"data,omitempty"`
}

type HeartbeatJSONRequestAttributes

type HeartbeatJSONRequestAttributes struct {
	TaskID    string                 `json:"task_id,omitempty"`
	Client    actionsclientpb.Client `json:"client,omitempty"`
	ActionFQN string                 `json:"action_fqn,omitempty"`
	JobId     string                 `json:"job_id,omitempty"`
}

type PublicClient

type PublicClient interface {
	EnrollWithApiKey(ctx context.Context, apiKey string, appKey string, runnerName string, runnerModes []modes.Mode, publicJwk *jose.JSONWebKey) (*par.CreateRunnerResponse, error)
}

PublicClient exposes endpoint that don't require JWT authentication

func NewPublicClient

func NewPublicClient(ddBaseURL string) PublicClient

type PublishTaskUpdateJSONData

type PublishTaskUpdateJSONData struct {
	Type       string                                  `json:"type,omitempty"`
	ID         string                                  `json:"id,omitempty"`
	Attributes *PublishTaskUpdateJSONRequestAttributes `json:"attributes,omitempty"`
}

type PublishTaskUpdateJSONRequest

type PublishTaskUpdateJSONRequest struct {
	Data *PublishTaskUpdateJSONData `json:"data,omitempty"`
}

type PublishTaskUpdateJSONRequestAttributes

type PublishTaskUpdateJSONRequestAttributes struct {
	TaskID    string                               `json:"task_id,omitempty"`
	Client    actionsclientpb.Client               `json:"client,omitempty"`
	ActionFQN string                               `json:"action_fqn,omitempty"`
	JobId     string                               `json:"job_id,omitempty"`
	Payload   *PublishTaskUpdateJSONRequestPayload `json:"payload,omitempty"`
}

type PublishTaskUpdateJSONRequestPayload

type PublishTaskUpdateJSONRequestPayload struct {
	Branch       string                            `json:"branch,omitempty"`
	Outputs      interface{}                       `json:"outputs,omitempty"`
	ErrorCode    aperrorpb.ActionPlatformErrorCode `json:"error_code,omitempty"`
	ErrorDetails string                            `json:"error_details,omitempty"`
	APIError     string                            `json:"api_error,omitempty"`
}

Jump to

Keyboard shortcuts

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