satellite/envoy/accesslog/v3/alsv3_grpc.pb.go (98 lines of code) (raw):

// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package v3 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" v3 "skywalking.apache.org/repo/goapi/proto/envoy/service/accesslog/v3" ) // 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 // SatelliteAccessLogServiceClient is the client API for SatelliteAccessLogService 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 SatelliteAccessLogServiceClient interface { // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any // response to be sent as nothing would be done in the case of failure. The server should // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different // API for "critical" access logs in which Envoy will buffer access logs for some period of time // until it gets an ACK so it could then retry. This API is designed for high throughput with the // expectation that it might be lossy. StreamAccessLogs(ctx context.Context, opts ...grpc.CallOption) (SatelliteAccessLogService_StreamAccessLogsClient, error) } type satelliteAccessLogServiceClient struct { cc grpc.ClientConnInterface } func NewSatelliteAccessLogServiceClient(cc grpc.ClientConnInterface) SatelliteAccessLogServiceClient { return &satelliteAccessLogServiceClient{cc} } func (c *satelliteAccessLogServiceClient) StreamAccessLogs(ctx context.Context, opts ...grpc.CallOption) (SatelliteAccessLogService_StreamAccessLogsClient, error) { stream, err := c.cc.NewStream(ctx, &SatelliteAccessLogService_ServiceDesc.Streams[0], "/satellite.envoy.accesslog.v3.SatelliteAccessLogService/StreamAccessLogs", opts...) if err != nil { return nil, err } x := &satelliteAccessLogServiceStreamAccessLogsClient{stream} return x, nil } type SatelliteAccessLogService_StreamAccessLogsClient interface { Send(*v3.StreamAccessLogsMessage) error CloseAndRecv() (*v3.StreamAccessLogsResponse, error) grpc.ClientStream } type satelliteAccessLogServiceStreamAccessLogsClient struct { grpc.ClientStream } func (x *satelliteAccessLogServiceStreamAccessLogsClient) Send(m *v3.StreamAccessLogsMessage) error { return x.ClientStream.SendMsg(m) } func (x *satelliteAccessLogServiceStreamAccessLogsClient) CloseAndRecv() (*v3.StreamAccessLogsResponse, error) { if err := x.ClientStream.CloseSend(); err != nil { return nil, err } m := new(v3.StreamAccessLogsResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // SatelliteAccessLogServiceServer is the server API for SatelliteAccessLogService service. // All implementations must embed UnimplementedSatelliteAccessLogServiceServer // for forward compatibility type SatelliteAccessLogServiceServer interface { // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any // response to be sent as nothing would be done in the case of failure. The server should // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different // API for "critical" access logs in which Envoy will buffer access logs for some period of time // until it gets an ACK so it could then retry. This API is designed for high throughput with the // expectation that it might be lossy. StreamAccessLogs(SatelliteAccessLogService_StreamAccessLogsServer) error mustEmbedUnimplementedSatelliteAccessLogServiceServer() } // UnimplementedSatelliteAccessLogServiceServer must be embedded to have forward compatible implementations. type UnimplementedSatelliteAccessLogServiceServer struct { } func (UnimplementedSatelliteAccessLogServiceServer) StreamAccessLogs(SatelliteAccessLogService_StreamAccessLogsServer) error { return status.Errorf(codes.Unimplemented, "method StreamAccessLogs not implemented") } func (UnimplementedSatelliteAccessLogServiceServer) mustEmbedUnimplementedSatelliteAccessLogServiceServer() { } // UnsafeSatelliteAccessLogServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SatelliteAccessLogServiceServer will // result in compilation errors. type UnsafeSatelliteAccessLogServiceServer interface { mustEmbedUnimplementedSatelliteAccessLogServiceServer() } func RegisterSatelliteAccessLogServiceServer(s grpc.ServiceRegistrar, srv SatelliteAccessLogServiceServer) { s.RegisterService(&SatelliteAccessLogService_ServiceDesc, srv) } func _SatelliteAccessLogService_StreamAccessLogs_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(SatelliteAccessLogServiceServer).StreamAccessLogs(&satelliteAccessLogServiceStreamAccessLogsServer{stream}) } type SatelliteAccessLogService_StreamAccessLogsServer interface { SendAndClose(*v3.StreamAccessLogsResponse) error Recv() (*v3.StreamAccessLogsMessage, error) grpc.ServerStream } type satelliteAccessLogServiceStreamAccessLogsServer struct { grpc.ServerStream } func (x *satelliteAccessLogServiceStreamAccessLogsServer) SendAndClose(m *v3.StreamAccessLogsResponse) error { return x.ServerStream.SendMsg(m) } func (x *satelliteAccessLogServiceStreamAccessLogsServer) Recv() (*v3.StreamAccessLogsMessage, error) { m := new(v3.StreamAccessLogsMessage) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // SatelliteAccessLogService_ServiceDesc is the grpc.ServiceDesc for SatelliteAccessLogService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var SatelliteAccessLogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "satellite.envoy.accesslog.v3.SatelliteAccessLogService", HandlerType: (*SatelliteAccessLogServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamAccessLogs", Handler: _SatelliteAccessLogService_StreamAccessLogs_Handler, ClientStreams: true, }, }, Metadata: "satellite/alsv3.proto", }