// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.0 // - protoc (unknown) // source: orlysync/relaygroup/v1/service.proto package relaygroupv1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" v1 "next.orly.dev/pkg/proto/orlysync/common/v1" ) // 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 ( RelayGroupService_Ready_FullMethodName = "/orlysync.relaygroup.v1.RelayGroupService/Ready" RelayGroupService_FindAuthoritativeConfig_FullMethodName = "/orlysync.relaygroup.v1.RelayGroupService/FindAuthoritativeConfig" RelayGroupService_GetRelays_FullMethodName = "/orlysync.relaygroup.v1.RelayGroupService/GetRelays" RelayGroupService_IsAuthorizedPublisher_FullMethodName = "/orlysync.relaygroup.v1.RelayGroupService/IsAuthorizedPublisher" RelayGroupService_GetAuthorizedPubkeys_FullMethodName = "/orlysync.relaygroup.v1.RelayGroupService/GetAuthorizedPubkeys" RelayGroupService_ValidateRelayGroupEvent_FullMethodName = "/orlysync.relaygroup.v1.RelayGroupService/ValidateRelayGroupEvent" RelayGroupService_HandleRelayGroupEvent_FullMethodName = "/orlysync.relaygroup.v1.RelayGroupService/HandleRelayGroupEvent" ) // RelayGroupServiceClient is the client API for RelayGroupService 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. // // RelayGroupService provides relay group configuration discovery // by selecting authoritative config from Kind 39105 events type RelayGroupServiceClient interface { // Ready returns whether the service is ready to serve requests Ready(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.ReadyResponse, error) // FindAuthoritativeConfig finds the authoritative relay group configuration // using timestamp ordering with hash tie-breaking FindAuthoritativeConfig(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*RelayGroupConfigResponse, error) // GetRelays returns the list of relays from the authoritative config GetRelays(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*RelaysResponse, error) // IsAuthorizedPublisher checks if a pubkey can publish relay group configs IsAuthorizedPublisher(ctx context.Context, in *AuthorizedPublisherRequest, opts ...grpc.CallOption) (*AuthorizedPublisherResponse, error) // GetAuthorizedPubkeys returns all authorized publisher pubkeys GetAuthorizedPubkeys(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*AuthorizedPubkeysResponse, error) // ValidateRelayGroupEvent validates a relay group configuration event ValidateRelayGroupEvent(ctx context.Context, in *ValidateEventRequest, opts ...grpc.CallOption) (*ValidateEventResponse, error) // HandleRelayGroupEvent processes a relay group event and triggers peer updates HandleRelayGroupEvent(ctx context.Context, in *HandleEventRequest, opts ...grpc.CallOption) (*v1.Empty, error) } type relayGroupServiceClient struct { cc grpc.ClientConnInterface } func NewRelayGroupServiceClient(cc grpc.ClientConnInterface) RelayGroupServiceClient { return &relayGroupServiceClient{cc} } func (c *relayGroupServiceClient) Ready(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.ReadyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(v1.ReadyResponse) err := c.cc.Invoke(ctx, RelayGroupService_Ready_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *relayGroupServiceClient) FindAuthoritativeConfig(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*RelayGroupConfigResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RelayGroupConfigResponse) err := c.cc.Invoke(ctx, RelayGroupService_FindAuthoritativeConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *relayGroupServiceClient) GetRelays(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*RelaysResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RelaysResponse) err := c.cc.Invoke(ctx, RelayGroupService_GetRelays_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *relayGroupServiceClient) IsAuthorizedPublisher(ctx context.Context, in *AuthorizedPublisherRequest, opts ...grpc.CallOption) (*AuthorizedPublisherResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AuthorizedPublisherResponse) err := c.cc.Invoke(ctx, RelayGroupService_IsAuthorizedPublisher_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *relayGroupServiceClient) GetAuthorizedPubkeys(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*AuthorizedPubkeysResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AuthorizedPubkeysResponse) err := c.cc.Invoke(ctx, RelayGroupService_GetAuthorizedPubkeys_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *relayGroupServiceClient) ValidateRelayGroupEvent(ctx context.Context, in *ValidateEventRequest, opts ...grpc.CallOption) (*ValidateEventResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ValidateEventResponse) err := c.cc.Invoke(ctx, RelayGroupService_ValidateRelayGroupEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *relayGroupServiceClient) HandleRelayGroupEvent(ctx context.Context, in *HandleEventRequest, opts ...grpc.CallOption) (*v1.Empty, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(v1.Empty) err := c.cc.Invoke(ctx, RelayGroupService_HandleRelayGroupEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // RelayGroupServiceServer is the server API for RelayGroupService service. // All implementations must embed UnimplementedRelayGroupServiceServer // for forward compatibility. // // RelayGroupService provides relay group configuration discovery // by selecting authoritative config from Kind 39105 events type RelayGroupServiceServer interface { // Ready returns whether the service is ready to serve requests Ready(context.Context, *v1.Empty) (*v1.ReadyResponse, error) // FindAuthoritativeConfig finds the authoritative relay group configuration // using timestamp ordering with hash tie-breaking FindAuthoritativeConfig(context.Context, *v1.Empty) (*RelayGroupConfigResponse, error) // GetRelays returns the list of relays from the authoritative config GetRelays(context.Context, *v1.Empty) (*RelaysResponse, error) // IsAuthorizedPublisher checks if a pubkey can publish relay group configs IsAuthorizedPublisher(context.Context, *AuthorizedPublisherRequest) (*AuthorizedPublisherResponse, error) // GetAuthorizedPubkeys returns all authorized publisher pubkeys GetAuthorizedPubkeys(context.Context, *v1.Empty) (*AuthorizedPubkeysResponse, error) // ValidateRelayGroupEvent validates a relay group configuration event ValidateRelayGroupEvent(context.Context, *ValidateEventRequest) (*ValidateEventResponse, error) // HandleRelayGroupEvent processes a relay group event and triggers peer updates HandleRelayGroupEvent(context.Context, *HandleEventRequest) (*v1.Empty, error) mustEmbedUnimplementedRelayGroupServiceServer() } // UnimplementedRelayGroupServiceServer 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 UnimplementedRelayGroupServiceServer struct{} func (UnimplementedRelayGroupServiceServer) Ready(context.Context, *v1.Empty) (*v1.ReadyResponse, error) { return nil, status.Error(codes.Unimplemented, "method Ready not implemented") } func (UnimplementedRelayGroupServiceServer) FindAuthoritativeConfig(context.Context, *v1.Empty) (*RelayGroupConfigResponse, error) { return nil, status.Error(codes.Unimplemented, "method FindAuthoritativeConfig not implemented") } func (UnimplementedRelayGroupServiceServer) GetRelays(context.Context, *v1.Empty) (*RelaysResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetRelays not implemented") } func (UnimplementedRelayGroupServiceServer) IsAuthorizedPublisher(context.Context, *AuthorizedPublisherRequest) (*AuthorizedPublisherResponse, error) { return nil, status.Error(codes.Unimplemented, "method IsAuthorizedPublisher not implemented") } func (UnimplementedRelayGroupServiceServer) GetAuthorizedPubkeys(context.Context, *v1.Empty) (*AuthorizedPubkeysResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAuthorizedPubkeys not implemented") } func (UnimplementedRelayGroupServiceServer) ValidateRelayGroupEvent(context.Context, *ValidateEventRequest) (*ValidateEventResponse, error) { return nil, status.Error(codes.Unimplemented, "method ValidateRelayGroupEvent not implemented") } func (UnimplementedRelayGroupServiceServer) HandleRelayGroupEvent(context.Context, *HandleEventRequest) (*v1.Empty, error) { return nil, status.Error(codes.Unimplemented, "method HandleRelayGroupEvent not implemented") } func (UnimplementedRelayGroupServiceServer) mustEmbedUnimplementedRelayGroupServiceServer() {} func (UnimplementedRelayGroupServiceServer) testEmbeddedByValue() {} // UnsafeRelayGroupServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RelayGroupServiceServer will // result in compilation errors. type UnsafeRelayGroupServiceServer interface { mustEmbedUnimplementedRelayGroupServiceServer() } func RegisterRelayGroupServiceServer(s grpc.ServiceRegistrar, srv RelayGroupServiceServer) { // If the following call panics, it indicates UnimplementedRelayGroupServiceServer 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(&RelayGroupService_ServiceDesc, srv) } func _RelayGroupService_Ready_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RelayGroupServiceServer).Ready(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RelayGroupService_Ready_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelayGroupServiceServer).Ready(ctx, req.(*v1.Empty)) } return interceptor(ctx, in, info, handler) } func _RelayGroupService_FindAuthoritativeConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RelayGroupServiceServer).FindAuthoritativeConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RelayGroupService_FindAuthoritativeConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelayGroupServiceServer).FindAuthoritativeConfig(ctx, req.(*v1.Empty)) } return interceptor(ctx, in, info, handler) } func _RelayGroupService_GetRelays_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RelayGroupServiceServer).GetRelays(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RelayGroupService_GetRelays_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelayGroupServiceServer).GetRelays(ctx, req.(*v1.Empty)) } return interceptor(ctx, in, info, handler) } func _RelayGroupService_IsAuthorizedPublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AuthorizedPublisherRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RelayGroupServiceServer).IsAuthorizedPublisher(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RelayGroupService_IsAuthorizedPublisher_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelayGroupServiceServer).IsAuthorizedPublisher(ctx, req.(*AuthorizedPublisherRequest)) } return interceptor(ctx, in, info, handler) } func _RelayGroupService_GetAuthorizedPubkeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RelayGroupServiceServer).GetAuthorizedPubkeys(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RelayGroupService_GetAuthorizedPubkeys_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelayGroupServiceServer).GetAuthorizedPubkeys(ctx, req.(*v1.Empty)) } return interceptor(ctx, in, info, handler) } func _RelayGroupService_ValidateRelayGroupEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidateEventRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RelayGroupServiceServer).ValidateRelayGroupEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RelayGroupService_ValidateRelayGroupEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelayGroupServiceServer).ValidateRelayGroupEvent(ctx, req.(*ValidateEventRequest)) } return interceptor(ctx, in, info, handler) } func _RelayGroupService_HandleRelayGroupEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HandleEventRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RelayGroupServiceServer).HandleRelayGroupEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RelayGroupService_HandleRelayGroupEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelayGroupServiceServer).HandleRelayGroupEvent(ctx, req.(*HandleEventRequest)) } return interceptor(ctx, in, info, handler) } // RelayGroupService_ServiceDesc is the grpc.ServiceDesc for RelayGroupService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var RelayGroupService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "orlysync.relaygroup.v1.RelayGroupService", HandlerType: (*RelayGroupServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ready", Handler: _RelayGroupService_Ready_Handler, }, { MethodName: "FindAuthoritativeConfig", Handler: _RelayGroupService_FindAuthoritativeConfig_Handler, }, { MethodName: "GetRelays", Handler: _RelayGroupService_GetRelays_Handler, }, { MethodName: "IsAuthorizedPublisher", Handler: _RelayGroupService_IsAuthorizedPublisher_Handler, }, { MethodName: "GetAuthorizedPubkeys", Handler: _RelayGroupService_GetAuthorizedPubkeys_Handler, }, { MethodName: "ValidateRelayGroupEvent", Handler: _RelayGroupService_ValidateRelayGroupEvent_Handler, }, { MethodName: "HandleRelayGroupEvent", Handler: _RelayGroupService_HandleRelayGroupEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "orlysync/relaygroup/v1/service.proto", }