// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 // - protoc v7.35.1 // source: sentry/agent/v1/agent_control.proto package agentv1 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 ( AgentControl_CheckIn_FullMethodName = "/sentry.agent.v1.AgentControl/CheckIn" ) // AgentControlClient is the client API for AgentControl 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. // // AgentControl is the control-plane counterpart to logs.v1.LogIngest's // data-plane PushBatch -- the same mTLS channel/connection an agent // already has open to ingest, a second gRPC service on the same // listener rather than a second protocol or connection the agent would // need to maintain (see /docs/agent-management-design.md). CheckIn is // agent-initiated, called on the agent's own heartbeat ticker: there is // still no path for the platform to reach into an agent uninvited. An // agent asks "what should I be running" on its own schedule -- the same // push-not-pull posture the heartbeat feature this builds on already // established. type AgentControlClient interface { CheckIn(ctx context.Context, in *CheckInRequest, opts ...grpc.CallOption) (*CheckInResponse, error) } type agentControlClient struct { cc grpc.ClientConnInterface } func NewAgentControlClient(cc grpc.ClientConnInterface) AgentControlClient { return &agentControlClient{cc} } func (c *agentControlClient) CheckIn(ctx context.Context, in *CheckInRequest, opts ...grpc.CallOption) (*CheckInResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckInResponse) err := c.cc.Invoke(ctx, AgentControl_CheckIn_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // AgentControlServer is the server API for AgentControl service. // All implementations must embed UnimplementedAgentControlServer // for forward compatibility. // // AgentControl is the control-plane counterpart to logs.v1.LogIngest's // data-plane PushBatch -- the same mTLS channel/connection an agent // already has open to ingest, a second gRPC service on the same // listener rather than a second protocol or connection the agent would // need to maintain (see /docs/agent-management-design.md). CheckIn is // agent-initiated, called on the agent's own heartbeat ticker: there is // still no path for the platform to reach into an agent uninvited. An // agent asks "what should I be running" on its own schedule -- the same // push-not-pull posture the heartbeat feature this builds on already // established. type AgentControlServer interface { CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error) mustEmbedUnimplementedAgentControlServer() } // UnimplementedAgentControlServer 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 UnimplementedAgentControlServer struct{} func (UnimplementedAgentControlServer) CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error) { return nil, status.Error(codes.Unimplemented, "method CheckIn not implemented") } func (UnimplementedAgentControlServer) mustEmbedUnimplementedAgentControlServer() {} func (UnimplementedAgentControlServer) testEmbeddedByValue() {} // UnsafeAgentControlServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AgentControlServer will // result in compilation errors. type UnsafeAgentControlServer interface { mustEmbedUnimplementedAgentControlServer() } func RegisterAgentControlServer(s grpc.ServiceRegistrar, srv AgentControlServer) { // If the following call panics, it indicates UnimplementedAgentControlServer 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(&AgentControl_ServiceDesc, srv) } func _AgentControl_CheckIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CheckInRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AgentControlServer).CheckIn(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AgentControl_CheckIn_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AgentControlServer).CheckIn(ctx, req.(*CheckInRequest)) } return interceptor(ctx, in, info, handler) } // AgentControl_ServiceDesc is the grpc.ServiceDesc for AgentControl service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AgentControl_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sentry.agent.v1.AgentControl", HandlerType: (*AgentControlServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CheckIn", Handler: _AgentControl_CheckIn_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sentry/agent/v1/agent_control.proto", }