Files
tasks/chasm/lib/scheduler/gen/schedulerpb/v1/service_grpc.pb.go
Lina JodoinandGitHub 8b9522095c [Scheduled Actions] Wire in sentinels for CreateSchedule to prevent cross-ID-space collisions (#9594)
## What changed?
- Adds sentinel creation to both V1 and CHASM codepath
- Adds new CreateSentinel RPC to the CHASM handler

## Why?
- Prevents duplication across separate ID spaces

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
- The biggets risk is accidentally having a sentinel leak into one of
our existing outputs, such as the List* APIs. I believe these cases have
lots of functional test coverage around asserting the right number of
items are coming back; I also did a deep dive into this earlier in
development.
2026-03-24 00:05:00 +00:00

407 lines
18 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// plugins:
// - protoc-gen-go-grpc
// - protoc
// source: temporal/server/chasm/lib/scheduler/proto/v1/service.proto
package schedulerpb
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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
SchedulerService_CreateSchedule_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/CreateSchedule"
SchedulerService_UpdateSchedule_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/UpdateSchedule"
SchedulerService_PatchSchedule_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/PatchSchedule"
SchedulerService_DeleteSchedule_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/DeleteSchedule"
SchedulerService_DescribeSchedule_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/DescribeSchedule"
SchedulerService_ListScheduleMatchingTimes_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/ListScheduleMatchingTimes"
SchedulerService_CreateFromMigrationState_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/CreateFromMigrationState"
SchedulerService_CreateSentinel_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/CreateSentinel"
SchedulerService_MigrateToWorkflow_FullMethodName = "/temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService/MigrateToWorkflow"
)
// SchedulerServiceClient is the client API for SchedulerService 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 SchedulerServiceClient interface {
CreateSchedule(ctx context.Context, in *CreateScheduleRequest, opts ...grpc.CallOption) (*CreateScheduleResponse, error)
UpdateSchedule(ctx context.Context, in *UpdateScheduleRequest, opts ...grpc.CallOption) (*UpdateScheduleResponse, error)
PatchSchedule(ctx context.Context, in *PatchScheduleRequest, opts ...grpc.CallOption) (*PatchScheduleResponse, error)
DeleteSchedule(ctx context.Context, in *DeleteScheduleRequest, opts ...grpc.CallOption) (*DeleteScheduleResponse, error)
DescribeSchedule(ctx context.Context, in *DescribeScheduleRequest, opts ...grpc.CallOption) (*DescribeScheduleResponse, error)
ListScheduleMatchingTimes(ctx context.Context, in *ListScheduleMatchingTimesRequest, opts ...grpc.CallOption) (*ListScheduleMatchingTimesResponse, error)
CreateFromMigrationState(ctx context.Context, in *CreateFromMigrationStateRequest, opts ...grpc.CallOption) (*CreateFromMigrationStateResponse, error)
CreateSentinel(ctx context.Context, in *CreateSentinelRequest, opts ...grpc.CallOption) (*CreateSentinelResponse, error)
MigrateToWorkflow(ctx context.Context, in *MigrateToWorkflowRequest, opts ...grpc.CallOption) (*MigrateToWorkflowResponse, error)
}
type schedulerServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSchedulerServiceClient(cc grpc.ClientConnInterface) SchedulerServiceClient {
return &schedulerServiceClient{cc}
}
func (c *schedulerServiceClient) CreateSchedule(ctx context.Context, in *CreateScheduleRequest, opts ...grpc.CallOption) (*CreateScheduleResponse, error) {
out := new(CreateScheduleResponse)
err := c.cc.Invoke(ctx, SchedulerService_CreateSchedule_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerServiceClient) UpdateSchedule(ctx context.Context, in *UpdateScheduleRequest, opts ...grpc.CallOption) (*UpdateScheduleResponse, error) {
out := new(UpdateScheduleResponse)
err := c.cc.Invoke(ctx, SchedulerService_UpdateSchedule_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerServiceClient) PatchSchedule(ctx context.Context, in *PatchScheduleRequest, opts ...grpc.CallOption) (*PatchScheduleResponse, error) {
out := new(PatchScheduleResponse)
err := c.cc.Invoke(ctx, SchedulerService_PatchSchedule_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerServiceClient) DeleteSchedule(ctx context.Context, in *DeleteScheduleRequest, opts ...grpc.CallOption) (*DeleteScheduleResponse, error) {
out := new(DeleteScheduleResponse)
err := c.cc.Invoke(ctx, SchedulerService_DeleteSchedule_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerServiceClient) DescribeSchedule(ctx context.Context, in *DescribeScheduleRequest, opts ...grpc.CallOption) (*DescribeScheduleResponse, error) {
out := new(DescribeScheduleResponse)
err := c.cc.Invoke(ctx, SchedulerService_DescribeSchedule_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerServiceClient) ListScheduleMatchingTimes(ctx context.Context, in *ListScheduleMatchingTimesRequest, opts ...grpc.CallOption) (*ListScheduleMatchingTimesResponse, error) {
out := new(ListScheduleMatchingTimesResponse)
err := c.cc.Invoke(ctx, SchedulerService_ListScheduleMatchingTimes_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerServiceClient) CreateFromMigrationState(ctx context.Context, in *CreateFromMigrationStateRequest, opts ...grpc.CallOption) (*CreateFromMigrationStateResponse, error) {
out := new(CreateFromMigrationStateResponse)
err := c.cc.Invoke(ctx, SchedulerService_CreateFromMigrationState_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerServiceClient) CreateSentinel(ctx context.Context, in *CreateSentinelRequest, opts ...grpc.CallOption) (*CreateSentinelResponse, error) {
out := new(CreateSentinelResponse)
err := c.cc.Invoke(ctx, SchedulerService_CreateSentinel_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerServiceClient) MigrateToWorkflow(ctx context.Context, in *MigrateToWorkflowRequest, opts ...grpc.CallOption) (*MigrateToWorkflowResponse, error) {
out := new(MigrateToWorkflowResponse)
err := c.cc.Invoke(ctx, SchedulerService_MigrateToWorkflow_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SchedulerServiceServer is the server API for SchedulerService service.
// All implementations must embed UnimplementedSchedulerServiceServer
// for forward compatibility
type SchedulerServiceServer interface {
CreateSchedule(context.Context, *CreateScheduleRequest) (*CreateScheduleResponse, error)
UpdateSchedule(context.Context, *UpdateScheduleRequest) (*UpdateScheduleResponse, error)
PatchSchedule(context.Context, *PatchScheduleRequest) (*PatchScheduleResponse, error)
DeleteSchedule(context.Context, *DeleteScheduleRequest) (*DeleteScheduleResponse, error)
DescribeSchedule(context.Context, *DescribeScheduleRequest) (*DescribeScheduleResponse, error)
ListScheduleMatchingTimes(context.Context, *ListScheduleMatchingTimesRequest) (*ListScheduleMatchingTimesResponse, error)
CreateFromMigrationState(context.Context, *CreateFromMigrationStateRequest) (*CreateFromMigrationStateResponse, error)
CreateSentinel(context.Context, *CreateSentinelRequest) (*CreateSentinelResponse, error)
MigrateToWorkflow(context.Context, *MigrateToWorkflowRequest) (*MigrateToWorkflowResponse, error)
mustEmbedUnimplementedSchedulerServiceServer()
}
// UnimplementedSchedulerServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSchedulerServiceServer struct {
}
func (UnimplementedSchedulerServiceServer) CreateSchedule(context.Context, *CreateScheduleRequest) (*CreateScheduleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateSchedule not implemented")
}
func (UnimplementedSchedulerServiceServer) UpdateSchedule(context.Context, *UpdateScheduleRequest) (*UpdateScheduleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSchedule not implemented")
}
func (UnimplementedSchedulerServiceServer) PatchSchedule(context.Context, *PatchScheduleRequest) (*PatchScheduleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PatchSchedule not implemented")
}
func (UnimplementedSchedulerServiceServer) DeleteSchedule(context.Context, *DeleteScheduleRequest) (*DeleteScheduleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteSchedule not implemented")
}
func (UnimplementedSchedulerServiceServer) DescribeSchedule(context.Context, *DescribeScheduleRequest) (*DescribeScheduleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DescribeSchedule not implemented")
}
func (UnimplementedSchedulerServiceServer) ListScheduleMatchingTimes(context.Context, *ListScheduleMatchingTimesRequest) (*ListScheduleMatchingTimesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListScheduleMatchingTimes not implemented")
}
func (UnimplementedSchedulerServiceServer) CreateFromMigrationState(context.Context, *CreateFromMigrationStateRequest) (*CreateFromMigrationStateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateFromMigrationState not implemented")
}
func (UnimplementedSchedulerServiceServer) CreateSentinel(context.Context, *CreateSentinelRequest) (*CreateSentinelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateSentinel not implemented")
}
func (UnimplementedSchedulerServiceServer) MigrateToWorkflow(context.Context, *MigrateToWorkflowRequest) (*MigrateToWorkflowResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method MigrateToWorkflow not implemented")
}
func (UnimplementedSchedulerServiceServer) mustEmbedUnimplementedSchedulerServiceServer() {}
// UnsafeSchedulerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SchedulerServiceServer will
// result in compilation errors.
type UnsafeSchedulerServiceServer interface {
mustEmbedUnimplementedSchedulerServiceServer()
}
func RegisterSchedulerServiceServer(s grpc.ServiceRegistrar, srv SchedulerServiceServer) {
s.RegisterService(&SchedulerService_ServiceDesc, srv)
}
func _SchedulerService_CreateSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateScheduleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).CreateSchedule(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_CreateSchedule_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).CreateSchedule(ctx, req.(*CreateScheduleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerService_UpdateSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateScheduleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).UpdateSchedule(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_UpdateSchedule_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).UpdateSchedule(ctx, req.(*UpdateScheduleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerService_PatchSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PatchScheduleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).PatchSchedule(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_PatchSchedule_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).PatchSchedule(ctx, req.(*PatchScheduleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerService_DeleteSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteScheduleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).DeleteSchedule(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_DeleteSchedule_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).DeleteSchedule(ctx, req.(*DeleteScheduleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerService_DescribeSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DescribeScheduleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).DescribeSchedule(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_DescribeSchedule_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).DescribeSchedule(ctx, req.(*DescribeScheduleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerService_ListScheduleMatchingTimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListScheduleMatchingTimesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).ListScheduleMatchingTimes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_ListScheduleMatchingTimes_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).ListScheduleMatchingTimes(ctx, req.(*ListScheduleMatchingTimesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerService_CreateFromMigrationState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateFromMigrationStateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).CreateFromMigrationState(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_CreateFromMigrationState_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).CreateFromMigrationState(ctx, req.(*CreateFromMigrationStateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerService_CreateSentinel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateSentinelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).CreateSentinel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_CreateSentinel_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).CreateSentinel(ctx, req.(*CreateSentinelRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerService_MigrateToWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MigrateToWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerServiceServer).MigrateToWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchedulerService_MigrateToWorkflow_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerServiceServer).MigrateToWorkflow(ctx, req.(*MigrateToWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
// SchedulerService_ServiceDesc is the grpc.ServiceDesc for SchedulerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SchedulerService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "temporal.server.chasm.lib.scheduler.proto.v1.SchedulerService",
HandlerType: (*SchedulerServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateSchedule",
Handler: _SchedulerService_CreateSchedule_Handler,
},
{
MethodName: "UpdateSchedule",
Handler: _SchedulerService_UpdateSchedule_Handler,
},
{
MethodName: "PatchSchedule",
Handler: _SchedulerService_PatchSchedule_Handler,
},
{
MethodName: "DeleteSchedule",
Handler: _SchedulerService_DeleteSchedule_Handler,
},
{
MethodName: "DescribeSchedule",
Handler: _SchedulerService_DescribeSchedule_Handler,
},
{
MethodName: "ListScheduleMatchingTimes",
Handler: _SchedulerService_ListScheduleMatchingTimes_Handler,
},
{
MethodName: "CreateFromMigrationState",
Handler: _SchedulerService_CreateFromMigrationState_Handler,
},
{
MethodName: "CreateSentinel",
Handler: _SchedulerService_CreateSentinel_Handler,
},
{
MethodName: "MigrateToWorkflow",
Handler: _SchedulerService_MigrateToWorkflow_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "temporal/server/chasm/lib/scheduler/proto/v1/service.proto",
}