pb

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Actions_Run_FullMethodName     = "/pb.Actions/Run"
	Actions_Cleanup_FullMethodName = "/pb.Actions/Cleanup"
)

Variables

View Source
var Actions_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.Actions",
	HandlerType: (*ActionsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Run",
			Handler:    _Actions_Run_Handler,
		},
		{
			MethodName: "Cleanup",
			Handler:    _Actions_Cleanup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pb/actions.proto",
}

Actions_ServiceDesc is the grpc.ServiceDesc for Actions service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_pb_actions_proto protoreflect.FileDescriptor

Functions

func RegisterActionsServer

func RegisterActionsServer(s grpc.ServiceRegistrar, srv ActionsServer)

Types

type ActionsClient

type ActionsClient interface {
	Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error)
	// Cleanup is called once, after the last step of a run, on an action
	// whose action.yml sets cleanup, however many steps used it.
	Cleanup(ctx context.Context, in *CleanupRequest, opts ...grpc.CallOption) (*CleanupResponse, error)
}

ActionsClient is the client API for Actions service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewActionsClient

func NewActionsClient(cc grpc.ClientConnInterface) ActionsClient

type ActionsServer

type ActionsServer interface {
	Run(context.Context, *RunRequest) (*RunResponse, error)
	// Cleanup is called once, after the last step of a run, on an action
	// whose action.yml sets cleanup, however many steps used it.
	Cleanup(context.Context, *CleanupRequest) (*CleanupResponse, error)
}

ActionsServer is the server API for Actions service. All implementations should embed UnimplementedActionsServer for forward compatibility

type CleanupRequest added in v1.27.0

type CleanupRequest struct {

	// The run of probe that is over, as each step of it was told in Step.
	RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	// contains filtered or unexported fields
}

CleanupRequest tells an action that a run is over, for it to remove what its steps left behind in it.

func (*CleanupRequest) Descriptor deprecated added in v1.27.0

func (*CleanupRequest) Descriptor() ([]byte, []int)

Deprecated: Use CleanupRequest.ProtoReflect.Descriptor instead.

func (*CleanupRequest) GetRunId added in v1.27.0

func (x *CleanupRequest) GetRunId() string

func (*CleanupRequest) ProtoMessage added in v1.27.0

func (*CleanupRequest) ProtoMessage()

func (*CleanupRequest) ProtoReflect added in v1.27.0

func (x *CleanupRequest) ProtoReflect() protoreflect.Message

func (*CleanupRequest) Reset added in v1.27.0

func (x *CleanupRequest) Reset()

func (*CleanupRequest) String added in v1.27.0

func (x *CleanupRequest) String() string

type CleanupResponse added in v1.27.0

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

func (*CleanupResponse) Descriptor deprecated added in v1.27.0

func (*CleanupResponse) Descriptor() ([]byte, []int)

Deprecated: Use CleanupResponse.ProtoReflect.Descriptor instead.

func (*CleanupResponse) ProtoMessage added in v1.27.0

func (*CleanupResponse) ProtoMessage()

func (*CleanupResponse) ProtoReflect added in v1.27.0

func (x *CleanupResponse) ProtoReflect() protoreflect.Message

func (*CleanupResponse) Reset added in v1.27.0

func (x *CleanupResponse) Reset()

func (*CleanupResponse) String added in v1.27.0

func (x *CleanupResponse) String() string

type Guard

type Guard struct {

	// Whether only what reads is allowed, and nothing that writes.
	ReadOnly bool `protobuf:"varint,1,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
	// The hosts actions may connect to, such as api.example.com,
	// localhost:8080 or *.internal; empty for any.
	AllowHosts []string `protobuf:"bytes,2,rep,name=allow_hosts,json=allowHosts,proto3" json:"allow_hosts,omitempty"`
	// The actions run under the guard although they do not keep to it.
	AllowActions []string `protobuf:"bytes,3,rep,name=allow_actions,json=allowActions,proto3" json:"allow_actions,omitempty"`
	// The kinds of guard each action keeps to itself, such as read-only and
	// allow-host, keyed by the action as a step's uses names it.
	Keeps map[string]*GuardKinds `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

Guard is what the run allows actions to do, set by whoever runs probe rather than by the workflow. An action that keeps to it refuses what it does not allow; an empty guard allows everything.

func (*Guard) Descriptor deprecated

func (*Guard) Descriptor() ([]byte, []int)

Deprecated: Use Guard.ProtoReflect.Descriptor instead.

func (*Guard) GetAllowActions

func (x *Guard) GetAllowActions() []string

func (*Guard) GetAllowHosts

func (x *Guard) GetAllowHosts() []string

func (*Guard) GetKeeps

func (x *Guard) GetKeeps() map[string]*GuardKinds

func (*Guard) GetReadOnly

func (x *Guard) GetReadOnly() bool

func (*Guard) ProtoMessage

func (*Guard) ProtoMessage()

func (*Guard) ProtoReflect

func (x *Guard) ProtoReflect() protoreflect.Message

func (*Guard) Reset

func (x *Guard) Reset()

func (*Guard) String

func (x *Guard) String() string

type GuardKinds

type GuardKinds struct {
	Kinds []string `protobuf:"bytes,1,rep,name=kinds,proto3" json:"kinds,omitempty"`
	// contains filtered or unexported fields
}

GuardKinds are the kinds of guard an action keeps to.

func (*GuardKinds) Descriptor deprecated

func (*GuardKinds) Descriptor() ([]byte, []int)

Deprecated: Use GuardKinds.ProtoReflect.Descriptor instead.

func (*GuardKinds) GetKinds

func (x *GuardKinds) GetKinds() []string

func (*GuardKinds) ProtoMessage

func (*GuardKinds) ProtoMessage()

func (*GuardKinds) ProtoReflect

func (x *GuardKinds) ProtoReflect() protoreflect.Message

func (*GuardKinds) Reset

func (x *GuardKinds) Reset()

func (*GuardKinds) String

func (x *GuardKinds) String() string

type RunRequest

type RunRequest struct {
	With *structpb.Struct `protobuf:"bytes,2,opt,name=with,proto3" json:"with,omitempty"`
	// The state the action left in the job before, for a stateful action.
	State *structpb.Struct `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// The step the action runs for.
	Step *Step `protobuf:"bytes,4,opt,name=step,proto3" json:"step,omitempty"`
	// What the run allows the action to do, which the action keeps to.
	Guard *Guard `protobuf:"bytes,5,opt,name=guard,proto3" json:"guard,omitempty"`
	// The names the workflow gives its external actions, each with the action
	// it stands for, for an action that runs steps of its own.
	Actions map[string]string `` /* 141-byte string literal not displayed */
	// Whether the runner cleans up once the run is over: it calls Cleanup of
	// an action whose action.yml asks for it, and of the actions the response
	// names in cleanups.
	Cleanup bool `protobuf:"varint,7,opt,name=cleanup,proto3" json:"cleanup,omitempty"`
	// contains filtered or unexported fields
}

func (*RunRequest) Descriptor deprecated

func (*RunRequest) Descriptor() ([]byte, []int)

Deprecated: Use RunRequest.ProtoReflect.Descriptor instead.

func (*RunRequest) GetActions

func (x *RunRequest) GetActions() map[string]string

func (*RunRequest) GetCleanup added in v1.27.0

func (x *RunRequest) GetCleanup() bool

func (*RunRequest) GetGuard

func (x *RunRequest) GetGuard() *Guard

func (*RunRequest) GetState

func (x *RunRequest) GetState() *structpb.Struct

func (*RunRequest) GetStep

func (x *RunRequest) GetStep() *Step

func (*RunRequest) GetWith

func (x *RunRequest) GetWith() *structpb.Struct

func (*RunRequest) ProtoMessage

func (*RunRequest) ProtoMessage()

func (*RunRequest) ProtoReflect

func (x *RunRequest) ProtoReflect() protoreflect.Message

func (*RunRequest) Reset

func (x *RunRequest) Reset()

func (*RunRequest) String

func (x *RunRequest) String() string

type RunResponse

type RunResponse struct {
	Result *structpb.Struct `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// The state the action leaves in the job, or none to keep it as it was.
	State *structpb.Struct `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// The external actions the action ran that are to be cleaned up once the
	// run is over, each as a step's uses names it in full, for an action that
	// runs steps of its own. A local action is an absolute path here.
	Cleanups []string `protobuf:"bytes,4,rep,name=cleanups,proto3" json:"cleanups,omitempty"`
	// contains filtered or unexported fields
}

func (*RunResponse) Descriptor deprecated

func (*RunResponse) Descriptor() ([]byte, []int)

Deprecated: Use RunResponse.ProtoReflect.Descriptor instead.

func (*RunResponse) GetCleanups added in v1.27.0

func (x *RunResponse) GetCleanups() []string

func (*RunResponse) GetResult

func (x *RunResponse) GetResult() *structpb.Struct

func (*RunResponse) GetState

func (x *RunResponse) GetState() *structpb.Struct

func (*RunResponse) ProtoMessage

func (*RunResponse) ProtoMessage()

func (*RunResponse) ProtoReflect

func (x *RunResponse) ProtoReflect() protoreflect.Message

func (*RunResponse) Reset

func (x *RunResponse) Reset()

func (*RunResponse) String

func (x *RunResponse) String() string

type Step

type Step struct {

	// The run of probe, the same for every step of every job in it.
	RunId   string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	JobId   string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	JobName string `protobuf:"bytes,3,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"`
	// The position of the step in the job, from 0.
	Index int64 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
	// The id the step is given, or empty.
	Id   string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
	// Which run of a repeated job, from 0.
	Repeat int64 `protobuf:"varint,7,opt,name=repeat,proto3" json:"repeat,omitempty"`
	// Which attempt of a retried step, from 1.
	Attempt int64 `protobuf:"varint,8,opt,name=attempt,proto3" json:"attempt,omitempty"`
	// contains filtered or unexported fields
}

Step tells an action about the step it runs for, for it to use as it sees fit, such as to say where a request comes from.

func (*Step) Descriptor deprecated

func (*Step) Descriptor() ([]byte, []int)

Deprecated: Use Step.ProtoReflect.Descriptor instead.

func (*Step) GetAttempt

func (x *Step) GetAttempt() int64

func (*Step) GetId

func (x *Step) GetId() string

func (*Step) GetIndex

func (x *Step) GetIndex() int64

func (*Step) GetJobId

func (x *Step) GetJobId() string

func (*Step) GetJobName

func (x *Step) GetJobName() string

func (*Step) GetName

func (x *Step) GetName() string

func (*Step) GetRepeat

func (x *Step) GetRepeat() int64

func (*Step) GetRunId

func (x *Step) GetRunId() string

func (*Step) ProtoMessage

func (*Step) ProtoMessage()

func (*Step) ProtoReflect

func (x *Step) ProtoReflect() protoreflect.Message

func (*Step) Reset

func (x *Step) Reset()

func (*Step) String

func (x *Step) String() string

type UnimplementedActionsServer

type UnimplementedActionsServer struct {
}

UnimplementedActionsServer should be embedded to have forward compatible implementations.

func (UnimplementedActionsServer) Cleanup added in v1.27.0

func (UnimplementedActionsServer) Run

type UnsafeActionsServer

type UnsafeActionsServer interface {
	// contains filtered or unexported methods
}

UnsafeActionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ActionsServer will result in compilation errors.

Jump to

Keyboard shortcuts

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