message

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package message provides message types used in the executor. These types have to be in a separate package to prevent circular imports.

Usage:

import "github.com/go-vela/worker/internal/message"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockStreamRequestsWithCancel

func MockStreamRequestsWithCancel(ctx context.Context) (chan StreamRequest, context.CancelFunc)

MockStreamRequestsWithCancel discards all requests until you call the cancel function.

Types

type StreamFunc

type StreamFunc = func(context.Context, *pipeline.Container) error

StreamFunc is either StreamService or StreamStep in executor.Engine.

type StreamRequest

type StreamRequest struct {
	// Key is either "service" or "step".
	Key string
	// Stream is either Engine.StreamService or Engine.StreamStep.
	Stream StreamFunc
	// Container is the container for the service or step to stream logs for.
	Container *pipeline.Container
}

StreamRequest is the message used to begin streaming for a container (requests goes from ExecService / ExecStep to StreamBuild in executor).

Jump to

Keyboard shortcuts

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