Files
archie/internal/contracts/state/v1/execution_grpc.pb.go
T
sam a971947c39 refactor(state)!: split StateStoreService into per-domain services
One gRPC service per domain in state.v1 (tasks, executions, accounts, identities, packages, captures, bindings, access, orgs, alerts and so on), each with its own server type in staterpc. RPC and message names and numbers are unchanged.
2026-10-25 19:54:27 +11:00

292 lines
12 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: state/v1/execution.proto
package statev1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
ExecutionService_StartStep_FullMethodName = "/state.v1.ExecutionService/StartStep"
ExecutionService_RecordUsage_FullMethodName = "/state.v1.ExecutionService/RecordUsage"
ExecutionService_FinishStep_FullMethodName = "/state.v1.ExecutionService/FinishStep"
ExecutionService_CancelExecution_FullMethodName = "/state.v1.ExecutionService/CancelExecution"
ExecutionService_ListSteps_FullMethodName = "/state.v1.ExecutionService/ListSteps"
)
// ExecutionServiceClient is the client API for ExecutionService 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.
type ExecutionServiceClient interface {
// Step executions (docs/prds/execution-tree-state-machine.md). The run
// credential authorises both on its own execution only.
StartStep(ctx context.Context, in *StartStepRequest, opts ...grpc.CallOption) (*StartStepResponse, error)
// RecordUsage appends one model call's usage record. A run credential may
// record usage only for its own task.
RecordUsage(ctx context.Context, in *RecordUsageRequest, opts ...grpc.CallOption) (*RecordUsageResponse, error)
FinishStep(ctx context.Context, in *FinishStepRequest, opts ...grpc.CallOption) (*FinishStepResponse, error)
// Cancellation. Deliberately administrative (deny-by-default for a
// task-scoped grant): a cancel is a dashboard, API and dispatch action
// decided by the Authorizer, not a worker call.
CancelExecution(ctx context.Context, in *CancelExecutionRequest, opts ...grpc.CallOption) (*CancelExecutionResponse, error)
// ListSteps is a dashboard/API/dispatch action (Authorizer: read on the
// run), not task-scoped-grant callable like StartStep/FinishStep.
ListSteps(ctx context.Context, in *ListStepsRequest, opts ...grpc.CallOption) (*ListStepsResponse, error)
}
type executionServiceClient struct {
cc grpc.ClientConnInterface
}
func NewExecutionServiceClient(cc grpc.ClientConnInterface) ExecutionServiceClient {
return &executionServiceClient{cc}
}
func (c *executionServiceClient) StartStep(ctx context.Context, in *StartStepRequest, opts ...grpc.CallOption) (*StartStepResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StartStepResponse)
err := c.cc.Invoke(ctx, ExecutionService_StartStep_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *executionServiceClient) RecordUsage(ctx context.Context, in *RecordUsageRequest, opts ...grpc.CallOption) (*RecordUsageResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RecordUsageResponse)
err := c.cc.Invoke(ctx, ExecutionService_RecordUsage_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *executionServiceClient) FinishStep(ctx context.Context, in *FinishStepRequest, opts ...grpc.CallOption) (*FinishStepResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FinishStepResponse)
err := c.cc.Invoke(ctx, ExecutionService_FinishStep_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *executionServiceClient) CancelExecution(ctx context.Context, in *CancelExecutionRequest, opts ...grpc.CallOption) (*CancelExecutionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CancelExecutionResponse)
err := c.cc.Invoke(ctx, ExecutionService_CancelExecution_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *executionServiceClient) ListSteps(ctx context.Context, in *ListStepsRequest, opts ...grpc.CallOption) (*ListStepsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListStepsResponse)
err := c.cc.Invoke(ctx, ExecutionService_ListSteps_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ExecutionServiceServer is the server API for ExecutionService service.
// All implementations must embed UnimplementedExecutionServiceServer
// for forward compatibility.
type ExecutionServiceServer interface {
// Step executions (docs/prds/execution-tree-state-machine.md). The run
// credential authorises both on its own execution only.
StartStep(context.Context, *StartStepRequest) (*StartStepResponse, error)
// RecordUsage appends one model call's usage record. A run credential may
// record usage only for its own task.
RecordUsage(context.Context, *RecordUsageRequest) (*RecordUsageResponse, error)
FinishStep(context.Context, *FinishStepRequest) (*FinishStepResponse, error)
// Cancellation. Deliberately administrative (deny-by-default for a
// task-scoped grant): a cancel is a dashboard, API and dispatch action
// decided by the Authorizer, not a worker call.
CancelExecution(context.Context, *CancelExecutionRequest) (*CancelExecutionResponse, error)
// ListSteps is a dashboard/API/dispatch action (Authorizer: read on the
// run), not task-scoped-grant callable like StartStep/FinishStep.
ListSteps(context.Context, *ListStepsRequest) (*ListStepsResponse, error)
mustEmbedUnimplementedExecutionServiceServer()
}
// UnimplementedExecutionServiceServer 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.
type UnimplementedExecutionServiceServer struct{}
func (UnimplementedExecutionServiceServer) StartStep(context.Context, *StartStepRequest) (*StartStepResponse, error) {
return nil, status.Error(codes.Unimplemented, "method StartStep not implemented")
}
func (UnimplementedExecutionServiceServer) RecordUsage(context.Context, *RecordUsageRequest) (*RecordUsageResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RecordUsage not implemented")
}
func (UnimplementedExecutionServiceServer) FinishStep(context.Context, *FinishStepRequest) (*FinishStepResponse, error) {
return nil, status.Error(codes.Unimplemented, "method FinishStep not implemented")
}
func (UnimplementedExecutionServiceServer) CancelExecution(context.Context, *CancelExecutionRequest) (*CancelExecutionResponse, error) {
return nil, status.Error(codes.Unimplemented, "method CancelExecution not implemented")
}
func (UnimplementedExecutionServiceServer) ListSteps(context.Context, *ListStepsRequest) (*ListStepsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListSteps not implemented")
}
func (UnimplementedExecutionServiceServer) mustEmbedUnimplementedExecutionServiceServer() {}
func (UnimplementedExecutionServiceServer) testEmbeddedByValue() {}
// UnsafeExecutionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ExecutionServiceServer will
// result in compilation errors.
type UnsafeExecutionServiceServer interface {
mustEmbedUnimplementedExecutionServiceServer()
}
func RegisterExecutionServiceServer(s grpc.ServiceRegistrar, srv ExecutionServiceServer) {
// If the following call panics, it indicates UnimplementedExecutionServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&ExecutionService_ServiceDesc, srv)
}
func _ExecutionService_StartStep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StartStepRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExecutionServiceServer).StartStep(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExecutionService_StartStep_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExecutionServiceServer).StartStep(ctx, req.(*StartStepRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExecutionService_RecordUsage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RecordUsageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExecutionServiceServer).RecordUsage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExecutionService_RecordUsage_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExecutionServiceServer).RecordUsage(ctx, req.(*RecordUsageRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExecutionService_FinishStep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FinishStepRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExecutionServiceServer).FinishStep(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExecutionService_FinishStep_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExecutionServiceServer).FinishStep(ctx, req.(*FinishStepRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExecutionService_CancelExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CancelExecutionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExecutionServiceServer).CancelExecution(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExecutionService_CancelExecution_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExecutionServiceServer).CancelExecution(ctx, req.(*CancelExecutionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExecutionService_ListSteps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListStepsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExecutionServiceServer).ListSteps(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExecutionService_ListSteps_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExecutionServiceServer).ListSteps(ctx, req.(*ListStepsRequest))
}
return interceptor(ctx, in, info, handler)
}
// ExecutionService_ServiceDesc is the grpc.ServiceDesc for ExecutionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExecutionService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "state.v1.ExecutionService",
HandlerType: (*ExecutionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "StartStep",
Handler: _ExecutionService_StartStep_Handler,
},
{
MethodName: "RecordUsage",
Handler: _ExecutionService_RecordUsage_Handler,
},
{
MethodName: "FinishStep",
Handler: _ExecutionService_FinishStep_Handler,
},
{
MethodName: "CancelExecution",
Handler: _ExecutionService_CancelExecution_Handler,
},
{
MethodName: "ListSteps",
Handler: _ExecutionService_ListSteps_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "state/v1/execution.proto",
}