executor

package
v0.83.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Executor_RunAction_FullMethodName = "/datadog.privateactionrunner.executor.Executor/RunAction"
	Executor_Health_FullMethodName    = "/datadog.privateactionrunner.executor.Executor/Health"
)

Variables

View Source
var Executor_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "datadog.privateactionrunner.executor.Executor",
	HandlerType: (*ExecutorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Health",
			Handler:    _Executor_Health_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "RunAction",
			Handler:       _Executor_RunAction_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "datadog/privateactionrunner/executor.proto",
}

Executor_ServiceDesc is the grpc.ServiceDesc for Executor 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_datadog_privateactionrunner_executor_proto protoreflect.FileDescriptor

Functions

func RegisterExecutorServer

func RegisterExecutorServer(s grpc.ServiceRegistrar, srv ExecutorServer)

Types

type ActionResult

type ActionResult struct {

	// Types that are valid to be assigned to Outcome:
	//
	//	*ActionResult_Output
	//	*ActionResult_Error
	Outcome isActionResult_Outcome `protobuf_oneof:"outcome"`
	// contains filtered or unexported fields
}

ActionResult is the terminal outcome: a success output or a structured error.

func (*ActionResult) Descriptor deprecated

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

Deprecated: Use ActionResult.ProtoReflect.Descriptor instead.

func (*ActionResult) GetError

func (*ActionResult) GetOutcome

func (x *ActionResult) GetOutcome() isActionResult_Outcome

func (*ActionResult) GetOutput

func (x *ActionResult) GetOutput() []byte

func (*ActionResult) ProtoMessage

func (*ActionResult) ProtoMessage()

func (*ActionResult) ProtoReflect

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

func (*ActionResult) Reset

func (x *ActionResult) Reset()

func (*ActionResult) String

func (x *ActionResult) String() string

type ActionResult_Error

type ActionResult_Error struct {
	Error *errorcode.ActionPlatformError `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}

type ActionResult_Output

type ActionResult_Output struct {
	Output []byte `protobuf:"bytes,1,opt,name=output,proto3,oneof"`
}

type ActionStatus

type ActionStatus struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

ActionStatus is an optional in-progress update emitted while an action runs.

func (*ActionStatus) Descriptor deprecated

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

Deprecated: Use ActionStatus.ProtoReflect.Descriptor instead.

func (*ActionStatus) GetMessage

func (x *ActionStatus) GetMessage() string

func (*ActionStatus) ProtoMessage

func (*ActionStatus) ProtoMessage()

func (*ActionStatus) ProtoReflect

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

func (*ActionStatus) Reset

func (x *ActionStatus) Reset()

func (*ActionStatus) String

func (x *ActionStatus) String() string

type ExecutorClient

type ExecutorClient interface {
	// RunAction runs a single action and streams updates ending in a final ActionResult.
	RunAction(ctx context.Context, in *RunActionRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[RunActionResponse], error)
	// Health reports executor readiness and liveness; used to gate dispatch.
	Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
}

ExecutorClient is the client API for Executor 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 NewExecutorClient

func NewExecutorClient(cc grpc.ClientConnInterface) ExecutorClient

type ExecutorServer

type ExecutorServer interface {
	// RunAction runs a single action and streams updates ending in a final ActionResult.
	RunAction(*RunActionRequest, grpc.ServerStreamingServer[RunActionResponse]) error
	// Health reports executor readiness and liveness; used to gate dispatch.
	Health(context.Context, *HealthRequest) (*HealthResponse, error)
	// contains filtered or unexported methods
}

ExecutorServer is the server API for Executor service. All implementations must embed UnimplementedExecutorServer for forward compatibility.

type Executor_RunActionClient

type Executor_RunActionClient = grpc.ServerStreamingClient[RunActionResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Executor_RunActionServer

type Executor_RunActionServer = grpc.ServerStreamingServer[RunActionResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type HealthRequest

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

func (*HealthRequest) Descriptor deprecated

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

Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.

func (*HealthRequest) ProtoMessage

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) ProtoReflect

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

func (*HealthRequest) Reset

func (x *HealthRequest) Reset()

func (*HealthRequest) String

func (x *HealthRequest) String() string

type HealthResponse

type HealthResponse struct {
	Ready         bool   `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
	ActiveActions int32  `protobuf:"varint,2,opt,name=active_actions,json=activeActions,proto3" json:"active_actions,omitempty"`
	Version       string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

HealthResponse reports whether the executor can accept actions.

func (*HealthResponse) Descriptor deprecated

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

Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.

func (*HealthResponse) GetActiveActions

func (x *HealthResponse) GetActiveActions() int32

func (*HealthResponse) GetReady

func (x *HealthResponse) GetReady() bool

func (*HealthResponse) GetVersion

func (x *HealthResponse) GetVersion() string

func (*HealthResponse) ProtoMessage

func (*HealthResponse) ProtoMessage()

func (*HealthResponse) ProtoReflect

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

func (*HealthResponse) Reset

func (x *HealthResponse) Reset()

func (*HealthResponse) String

func (x *HealthResponse) String() string

type RunActionRequest

type RunActionRequest struct {
	Task []byte `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"`
	// contains filtered or unexported fields
}

RunActionRequest carries the raw task bytes as dequeued from OPMS so the executor can verify the task signature itself.

func (*RunActionRequest) Descriptor deprecated

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

Deprecated: Use RunActionRequest.ProtoReflect.Descriptor instead.

func (*RunActionRequest) GetTask

func (x *RunActionRequest) GetTask() []byte

func (*RunActionRequest) ProtoMessage

func (*RunActionRequest) ProtoMessage()

func (*RunActionRequest) ProtoReflect

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

func (*RunActionRequest) Reset

func (x *RunActionRequest) Reset()

func (*RunActionRequest) String

func (x *RunActionRequest) String() string

type RunActionResponse

type RunActionResponse struct {

	// Types that are valid to be assigned to Event:
	//
	//	*RunActionResponse_Status
	//	*RunActionResponse_Result
	Event isRunActionResponse_Event `protobuf_oneof:"event"`
	// contains filtered or unexported fields
}

RunActionResponse is one event in the RunAction stream, ending with exactly one ActionResult optionally preceded by ActionStatus updates.

func (*RunActionResponse) Descriptor deprecated

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

Deprecated: Use RunActionResponse.ProtoReflect.Descriptor instead.

func (*RunActionResponse) GetEvent

func (x *RunActionResponse) GetEvent() isRunActionResponse_Event

func (*RunActionResponse) GetResult

func (x *RunActionResponse) GetResult() *ActionResult

func (*RunActionResponse) GetStatus

func (x *RunActionResponse) GetStatus() *ActionStatus

func (*RunActionResponse) ProtoMessage

func (*RunActionResponse) ProtoMessage()

func (*RunActionResponse) ProtoReflect

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

func (*RunActionResponse) Reset

func (x *RunActionResponse) Reset()

func (*RunActionResponse) String

func (x *RunActionResponse) String() string

type RunActionResponse_Result

type RunActionResponse_Result struct {
	Result *ActionResult `protobuf:"bytes,2,opt,name=result,proto3,oneof"`
}

type RunActionResponse_Status

type RunActionResponse_Status struct {
	Status *ActionStatus `protobuf:"bytes,1,opt,name=status,proto3,oneof"`
}

type UnimplementedExecutorServer

type UnimplementedExecutorServer struct{}

UnimplementedExecutorServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedExecutorServer) Health

type UnsafeExecutorServer

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

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

Jump to

Keyboard shortcuts

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