/
t3
/
cli
Обзор
Документация
Войти
/
t3
/
cli
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
pkg/pb/agent_grpc.pb.go
115 строк
5 KB
Ivan Shibkikh
thinktime / pacing
04 июл 2026, 17:00
04 июл 2026, 17:00
5f2e4c7
Код
Авторство
О чём код?
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.1 // - protoc v7.34.1 // source: agent.proto package pb 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 ( AgentService_Stream_FullMethodName = "/agent.AgentService/Stream" ) // AgentServiceClient is the client API for AgentService 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 AgentServiceClient interface { Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AgentRequest, AgentResponse], error) } type agentServiceClient struct { cc grpc.ClientConnInterface } func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient { return &agentServiceClient{cc} } func (c *agentServiceClient) Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AgentRequest, AgentResponse], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &AgentService_ServiceDesc.Streams[0], AgentService_Stream_FullMethodName, cOpts...) if err != nil { return nil, err } x := &grpc.GenericClientStream[AgentRequest, AgentResponse]{ClientStream: stream} return x, nil } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type AgentService_StreamClient = grpc.BidiStreamingClient[AgentRequest, AgentResponse] // AgentServiceServer is the server API for AgentService service. // All implementations must embed UnimplementedAgentServiceServer // for forward compatibility. type AgentServiceServer interface { Stream(grpc.BidiStreamingServer[AgentRequest, AgentResponse]) error mustEmbedUnimplementedAgentServiceServer() } // UnimplementedAgentServiceServer 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 UnimplementedAgentServiceServer struct{} func (UnimplementedAgentServiceServer) Stream(grpc.BidiStreamingServer[AgentRequest, AgentResponse]) error { return status.Error(codes.Unimplemented, "method Stream not implemented") } func (UnimplementedAgentServiceServer) mustEmbedUnimplementedAgentServiceServer() {} func (UnimplementedAgentServiceServer) testEmbeddedByValue() {} // UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AgentServiceServer will // result in compilation errors. type UnsafeAgentServiceServer interface { mustEmbedUnimplementedAgentServiceServer() } func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer) { // If the following call panics, it indicates UnimplementedAgentServiceServer 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(&AgentService_ServiceDesc, srv) } func _AgentService_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(AgentServiceServer).Stream(&grpc.GenericServerStream[AgentRequest, AgentResponse]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type AgentService_StreamServer = grpc.BidiStreamingServer[AgentRequest, AgentResponse] // AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AgentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "agent.AgentService", HandlerType: (*AgentServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Stream", Handler: _AgentService_Stream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "agent.proto", }