| 1 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| 2 |
// versions: |
| 3 |
// - protoc-gen-go-grpc v1.3.0 |
| 4 |
// - protoc v5.29.1 |
| 5 |
// source: envoy/service/accesslog/v3/als.proto |
| 6 |
|
| 7 |
package accesslogv3 |
| 8 |
|
| 9 |
import ( |
| 10 |
context "context" |
| 11 |
grpc "google.golang.org/grpc" |
| 12 |
codes "google.golang.org/grpc/codes" |
| 13 |
status "google.golang.org/grpc/status" |
| 14 |
) |
| 15 |
|
| 16 |
// This is a compile-time assertion to ensure that this generated file |
| 17 |
// is compatible with the grpc package it is being compiled against. |
| 18 |
// Requires gRPC-Go v1.32.0 or later. |
| 19 |
const _ = grpc.SupportPackageIsVersion7 |
| 20 |
|
| 21 |
const ( |
| 22 |
AccessLogService_StreamAccessLogs_FullMethodName = "/envoy.service.accesslog.v3.AccessLogService/StreamAccessLogs" |
| 23 |
) |
| 24 |
|
| 25 |
// AccessLogServiceClient is the client API for AccessLogService service. |
| 26 |
// |
| 27 |
// 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. |
| 28 |
type AccessLogServiceClient interface { |
| 29 |
// Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any |
| 30 |
// response to be sent as nothing would be done in the case of failure. The server should |
| 31 |
// disconnect if it expects Envoy to reconnect. In the future we may decide to add a different |
| 32 |
// API for "critical" access logs in which Envoy will buffer access logs for some period of time |
| 33 |
// until it gets an ACK so it could then retry. This API is designed for high throughput with the |
| 34 |
// expectation that it might be lossy. |
| 35 |
StreamAccessLogs(ctx context.Context, opts ...grpc.CallOption) (AccessLogService_StreamAccessLogsClient, error) |
| 36 |
} |
| 37 |
|
| 38 |
type accessLogServiceClient struct { |
| 39 |
cc grpc.ClientConnInterface |
| 40 |
} |
| 41 |
|
| 42 |
func NewAccessLogServiceClient(cc grpc.ClientConnInterface) AccessLogServiceClient { |
| 43 |
return &accessLogServiceClient{cc} |
| 44 |
} |
| 45 |
|
| 46 |
func (c *accessLogServiceClient) StreamAccessLogs(ctx context.Context, opts ...grpc.CallOption) (AccessLogService_StreamAccessLogsClient, error) { |
| 47 |
stream, err := c.cc.NewStream(ctx, &AccessLogService_ServiceDesc.Streams[0], AccessLogService_StreamAccessLogs_FullMethodName, opts...) |
| 48 |
if err != nil { |
| 49 |
return nil, err |
| 50 |
} |
| 51 |
x := &accessLogServiceStreamAccessLogsClient{stream} |
| 52 |
return x, nil |
| 53 |
} |
| 54 |
|
| 55 |
type AccessLogService_StreamAccessLogsClient interface { |
| 56 |
Send(*StreamAccessLogsMessage) error |
| 57 |
CloseAndRecv() (*StreamAccessLogsResponse, error) |
| 58 |
grpc.ClientStream |
| 59 |
} |
| 60 |
|
| 61 |
type accessLogServiceStreamAccessLogsClient struct { |
| 62 |
grpc.ClientStream |
| 63 |
} |
| 64 |
|
| 65 |
func (x *accessLogServiceStreamAccessLogsClient) Send(m *StreamAccessLogsMessage) error { |
| 66 |
return x.ClientStream.SendMsg(m) |
| 67 |
} |
| 68 |
|
| 69 |
func (x *accessLogServiceStreamAccessLogsClient) CloseAndRecv() (*StreamAccessLogsResponse, error) { |
| 70 |
if err := x.ClientStream.CloseSend(); err != nil { |
| 71 |
return nil, err |
| 72 |
} |
| 73 |
m := new(StreamAccessLogsResponse) |
| 74 |
if err := x.ClientStream.RecvMsg(m); err != nil { |
| 75 |
return nil, err |
| 76 |
} |
| 77 |
return m, nil |
| 78 |
} |
| 79 |
|
| 80 |
// AccessLogServiceServer is the server API for AccessLogService service. |
| 81 |
// All implementations should embed UnimplementedAccessLogServiceServer |
| 82 |
// for forward compatibility |
| 83 |
type AccessLogServiceServer interface { |
| 84 |
// Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any |
| 85 |
// response to be sent as nothing would be done in the case of failure. The server should |
| 86 |
// disconnect if it expects Envoy to reconnect. In the future we may decide to add a different |
| 87 |
// API for "critical" access logs in which Envoy will buffer access logs for some period of time |
| 88 |
// until it gets an ACK so it could then retry. This API is designed for high throughput with the |
| 89 |
// expectation that it might be lossy. |
| 90 |
StreamAccessLogs(AccessLogService_StreamAccessLogsServer) error |
| 91 |
} |
| 92 |
|
| 93 |
// UnimplementedAccessLogServiceServer should be embedded to have forward compatible implementations. |
| 94 |
type UnimplementedAccessLogServiceServer struct { |
| 95 |
} |
| 96 |
|
| 97 |
func (UnimplementedAccessLogServiceServer) StreamAccessLogs(AccessLogService_StreamAccessLogsServer) error { |
| 98 |
return status.Errorf(codes.Unimplemented, "method StreamAccessLogs not implemented") |
| 99 |
} |
| 100 |
|
| 101 |
// UnsafeAccessLogServiceServer may be embedded to opt out of forward compatibility for this service. |
| 102 |
// Use of this interface is not recommended, as added methods to AccessLogServiceServer will |
| 103 |
// result in compilation errors. |
| 104 |
type UnsafeAccessLogServiceServer interface { |
| 105 |
mustEmbedUnimplementedAccessLogServiceServer() |
| 106 |
} |
| 107 |
|
| 108 |
func RegisterAccessLogServiceServer(s grpc.ServiceRegistrar, srv AccessLogServiceServer) { |
| 109 |
s.RegisterService(&AccessLogService_ServiceDesc, srv) |
| 110 |
} |
| 111 |
|
| 112 |
func _AccessLogService_StreamAccessLogs_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 113 |
return srv.(AccessLogServiceServer).StreamAccessLogs(&accessLogServiceStreamAccessLogsServer{stream}) |
| 114 |
} |
| 115 |
|
| 116 |
type AccessLogService_StreamAccessLogsServer interface { |
| 117 |
SendAndClose(*StreamAccessLogsResponse) error |
| 118 |
Recv() (*StreamAccessLogsMessage, error) |
| 119 |
grpc.ServerStream |
| 120 |
} |
| 121 |
|
| 122 |
type accessLogServiceStreamAccessLogsServer struct { |
| 123 |
grpc.ServerStream |
| 124 |
} |
| 125 |
|
| 126 |
func (x *accessLogServiceStreamAccessLogsServer) SendAndClose(m *StreamAccessLogsResponse) error { |
| 127 |
return x.ServerStream.SendMsg(m) |
| 128 |
} |
| 129 |
|
| 130 |
func (x *accessLogServiceStreamAccessLogsServer) Recv() (*StreamAccessLogsMessage, error) { |
| 131 |
m := new(StreamAccessLogsMessage) |
| 132 |
if err := x.ServerStream.RecvMsg(m); err != nil { |
| 133 |
return nil, err |
| 134 |
} |
| 135 |
return m, nil |
| 136 |
} |
| 137 |
|
| 138 |
// AccessLogService_ServiceDesc is the grpc.ServiceDesc for AccessLogService service. |
| 139 |
// It's only intended for direct use with grpc.RegisterService, |
| 140 |
// and not to be introspected or modified (even as a copy) |
| 141 |
var AccessLogService_ServiceDesc = grpc.ServiceDesc{ |
| 142 |
ServiceName: "envoy.service.accesslog.v3.AccessLogService", |
| 143 |
HandlerType: (*AccessLogServiceServer)(nil), |
| 144 |
Methods: []grpc.MethodDesc{}, |
| 145 |
Streams: []grpc.StreamDesc{ |
| 146 |
{ |
| 147 |
StreamName: "StreamAccessLogs", |
| 148 |
Handler: _AccessLogService_StreamAccessLogs_Handler, |
| 149 |
ClientStreams: true, |
| 150 |
}, |
| 151 |
}, |
| 152 |
Metadata: "envoy/service/accesslog/v3/als.proto", |
| 153 |
} |