github.com/nya3jp/tast@v0.0.0-20230601000426-85c8e4d83a9b/src/go.chromium.org/tast/core/internal/protocol/logging.pb.go (about)

     1  // Copyright 2019 The ChromiumOS Authors
     2  // Use of this source code is governed by a BSD-style license that can be
     3  // found in the LICENSE file.
     4  
     5  // Code generated by protoc-gen-go. DO NOT EDIT.
     6  // versions:
     7  // 	protoc-gen-go v1.27.1
     8  // 	protoc        v3.21.9
     9  // source: logging.proto
    10  
    11  package protocol
    12  
    13  import (
    14  	context "context"
    15  	grpc "google.golang.org/grpc"
    16  	codes "google.golang.org/grpc/codes"
    17  	status "google.golang.org/grpc/status"
    18  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    19  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    20  	reflect "reflect"
    21  	sync "sync"
    22  )
    23  
    24  const (
    25  	// Verify that this generated code is sufficiently up-to-date.
    26  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    27  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    28  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    29  )
    30  
    31  type ReadLogsRequest struct {
    32  	state         protoimpl.MessageState
    33  	sizeCache     protoimpl.SizeCache
    34  	unknownFields protoimpl.UnknownFields
    35  }
    36  
    37  func (x *ReadLogsRequest) Reset() {
    38  	*x = ReadLogsRequest{}
    39  	if protoimpl.UnsafeEnabled {
    40  		mi := &file_logging_proto_msgTypes[0]
    41  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    42  		ms.StoreMessageInfo(mi)
    43  	}
    44  }
    45  
    46  func (x *ReadLogsRequest) String() string {
    47  	return protoimpl.X.MessageStringOf(x)
    48  }
    49  
    50  func (*ReadLogsRequest) ProtoMessage() {}
    51  
    52  func (x *ReadLogsRequest) ProtoReflect() protoreflect.Message {
    53  	mi := &file_logging_proto_msgTypes[0]
    54  	if protoimpl.UnsafeEnabled && x != nil {
    55  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    56  		if ms.LoadMessageInfo() == nil {
    57  			ms.StoreMessageInfo(mi)
    58  		}
    59  		return ms
    60  	}
    61  	return mi.MessageOf(x)
    62  }
    63  
    64  // Deprecated: Use ReadLogsRequest.ProtoReflect.Descriptor instead.
    65  func (*ReadLogsRequest) Descriptor() ([]byte, []int) {
    66  	return file_logging_proto_rawDescGZIP(), []int{0}
    67  }
    68  
    69  type ReadLogsResponse struct {
    70  	state         protoimpl.MessageState
    71  	sizeCache     protoimpl.SizeCache
    72  	unknownFields protoimpl.UnknownFields
    73  
    74  	// entry is an emitted log entry. It is missing for an initial
    75  	// ReadLogsResponse to indicate success of subscription.
    76  	Entry *LogEntry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
    77  }
    78  
    79  func (x *ReadLogsResponse) Reset() {
    80  	*x = ReadLogsResponse{}
    81  	if protoimpl.UnsafeEnabled {
    82  		mi := &file_logging_proto_msgTypes[1]
    83  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    84  		ms.StoreMessageInfo(mi)
    85  	}
    86  }
    87  
    88  func (x *ReadLogsResponse) String() string {
    89  	return protoimpl.X.MessageStringOf(x)
    90  }
    91  
    92  func (*ReadLogsResponse) ProtoMessage() {}
    93  
    94  func (x *ReadLogsResponse) ProtoReflect() protoreflect.Message {
    95  	mi := &file_logging_proto_msgTypes[1]
    96  	if protoimpl.UnsafeEnabled && x != nil {
    97  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    98  		if ms.LoadMessageInfo() == nil {
    99  			ms.StoreMessageInfo(mi)
   100  		}
   101  		return ms
   102  	}
   103  	return mi.MessageOf(x)
   104  }
   105  
   106  // Deprecated: Use ReadLogsResponse.ProtoReflect.Descriptor instead.
   107  func (*ReadLogsResponse) Descriptor() ([]byte, []int) {
   108  	return file_logging_proto_rawDescGZIP(), []int{1}
   109  }
   110  
   111  func (x *ReadLogsResponse) GetEntry() *LogEntry {
   112  	if x != nil {
   113  		return x.Entry
   114  	}
   115  	return nil
   116  }
   117  
   118  type LogEntry struct {
   119  	state         protoimpl.MessageState
   120  	sizeCache     protoimpl.SizeCache
   121  	unknownFields protoimpl.UnknownFields
   122  
   123  	// Msg is a logged message.
   124  	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
   125  	// Seq is an ID of the log entry. It is a sequentially increasing number
   126  	// starting from 1.
   127  	Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"`
   128  }
   129  
   130  func (x *LogEntry) Reset() {
   131  	*x = LogEntry{}
   132  	if protoimpl.UnsafeEnabled {
   133  		mi := &file_logging_proto_msgTypes[2]
   134  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   135  		ms.StoreMessageInfo(mi)
   136  	}
   137  }
   138  
   139  func (x *LogEntry) String() string {
   140  	return protoimpl.X.MessageStringOf(x)
   141  }
   142  
   143  func (*LogEntry) ProtoMessage() {}
   144  
   145  func (x *LogEntry) ProtoReflect() protoreflect.Message {
   146  	mi := &file_logging_proto_msgTypes[2]
   147  	if protoimpl.UnsafeEnabled && x != nil {
   148  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   149  		if ms.LoadMessageInfo() == nil {
   150  			ms.StoreMessageInfo(mi)
   151  		}
   152  		return ms
   153  	}
   154  	return mi.MessageOf(x)
   155  }
   156  
   157  // Deprecated: Use LogEntry.ProtoReflect.Descriptor instead.
   158  func (*LogEntry) Descriptor() ([]byte, []int) {
   159  	return file_logging_proto_rawDescGZIP(), []int{2}
   160  }
   161  
   162  func (x *LogEntry) GetMsg() string {
   163  	if x != nil {
   164  		return x.Msg
   165  	}
   166  	return ""
   167  }
   168  
   169  func (x *LogEntry) GetSeq() uint64 {
   170  	if x != nil {
   171  		return x.Seq
   172  	}
   173  	return 0
   174  }
   175  
   176  var File_logging_proto protoreflect.FileDescriptor
   177  
   178  var file_logging_proto_rawDesc = []byte{
   179  	0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
   180  	0x09, 0x74, 0x61, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65,
   181  	0x61, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a,
   182  	0x10, 0x52, 0x65, 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
   183  	0x65, 0x12, 0x29, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
   184  	0x32, 0x13, 0x2e, 0x74, 0x61, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x67,
   185  	0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x2e, 0x0a, 0x08,
   186  	0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
   187  	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65,
   188  	0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x32, 0x54, 0x0a, 0x07,
   189  	0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x4c,
   190  	0x6f, 0x67, 0x73, 0x12, 0x1a, 0x2e, 0x74, 0x61, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
   191  	0x52, 0x65, 0x61, 0x64, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
   192  	0x1b, 0x2e, 0x74, 0x61, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64,
   193  	0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01,
   194  	0x30, 0x01, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75,
   195  	0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x74, 0x61, 0x73, 0x74, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
   196  	0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
   197  	0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   198  }
   199  
   200  var (
   201  	file_logging_proto_rawDescOnce sync.Once
   202  	file_logging_proto_rawDescData = file_logging_proto_rawDesc
   203  )
   204  
   205  func file_logging_proto_rawDescGZIP() []byte {
   206  	file_logging_proto_rawDescOnce.Do(func() {
   207  		file_logging_proto_rawDescData = protoimpl.X.CompressGZIP(file_logging_proto_rawDescData)
   208  	})
   209  	return file_logging_proto_rawDescData
   210  }
   211  
   212  var file_logging_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
   213  var file_logging_proto_goTypes = []interface{}{
   214  	(*ReadLogsRequest)(nil),  // 0: tast.core.ReadLogsRequest
   215  	(*ReadLogsResponse)(nil), // 1: tast.core.ReadLogsResponse
   216  	(*LogEntry)(nil),         // 2: tast.core.LogEntry
   217  }
   218  var file_logging_proto_depIdxs = []int32{
   219  	2, // 0: tast.core.ReadLogsResponse.entry:type_name -> tast.core.LogEntry
   220  	0, // 1: tast.core.Logging.ReadLogs:input_type -> tast.core.ReadLogsRequest
   221  	1, // 2: tast.core.Logging.ReadLogs:output_type -> tast.core.ReadLogsResponse
   222  	2, // [2:3] is the sub-list for method output_type
   223  	1, // [1:2] is the sub-list for method input_type
   224  	1, // [1:1] is the sub-list for extension type_name
   225  	1, // [1:1] is the sub-list for extension extendee
   226  	0, // [0:1] is the sub-list for field type_name
   227  }
   228  
   229  func init() { file_logging_proto_init() }
   230  func file_logging_proto_init() {
   231  	if File_logging_proto != nil {
   232  		return
   233  	}
   234  	if !protoimpl.UnsafeEnabled {
   235  		file_logging_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   236  			switch v := v.(*ReadLogsRequest); i {
   237  			case 0:
   238  				return &v.state
   239  			case 1:
   240  				return &v.sizeCache
   241  			case 2:
   242  				return &v.unknownFields
   243  			default:
   244  				return nil
   245  			}
   246  		}
   247  		file_logging_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   248  			switch v := v.(*ReadLogsResponse); i {
   249  			case 0:
   250  				return &v.state
   251  			case 1:
   252  				return &v.sizeCache
   253  			case 2:
   254  				return &v.unknownFields
   255  			default:
   256  				return nil
   257  			}
   258  		}
   259  		file_logging_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   260  			switch v := v.(*LogEntry); i {
   261  			case 0:
   262  				return &v.state
   263  			case 1:
   264  				return &v.sizeCache
   265  			case 2:
   266  				return &v.unknownFields
   267  			default:
   268  				return nil
   269  			}
   270  		}
   271  	}
   272  	type x struct{}
   273  	out := protoimpl.TypeBuilder{
   274  		File: protoimpl.DescBuilder{
   275  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   276  			RawDescriptor: file_logging_proto_rawDesc,
   277  			NumEnums:      0,
   278  			NumMessages:   3,
   279  			NumExtensions: 0,
   280  			NumServices:   1,
   281  		},
   282  		GoTypes:           file_logging_proto_goTypes,
   283  		DependencyIndexes: file_logging_proto_depIdxs,
   284  		MessageInfos:      file_logging_proto_msgTypes,
   285  	}.Build()
   286  	File_logging_proto = out.File
   287  	file_logging_proto_rawDesc = nil
   288  	file_logging_proto_goTypes = nil
   289  	file_logging_proto_depIdxs = nil
   290  }
   291  
   292  // Reference imports to suppress errors if they are not otherwise used.
   293  var _ context.Context
   294  var _ grpc.ClientConnInterface
   295  
   296  // This is a compile-time assertion to ensure that this generated file
   297  // is compatible with the grpc package it is being compiled against.
   298  const _ = grpc.SupportPackageIsVersion6
   299  
   300  // LoggingClient is the client API for Logging service.
   301  //
   302  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   303  type LoggingClient interface {
   304  	// ReadLogs subscribes to logs emitted by gRPC services.
   305  	// At the beginning of the call, one ReadLogsResponse with empty entry is
   306  	// sent to indicate success of subscription. Afterwards ReadLogsResponse is
   307  	// sent back as a stream as logs are emitted. The response stream is closed
   308  	// when the client closes the request stream or any error occurs.
   309  	// At most one client can have an active call of this method at a time.
   310  	ReadLogs(ctx context.Context, opts ...grpc.CallOption) (Logging_ReadLogsClient, error)
   311  }
   312  
   313  type loggingClient struct {
   314  	cc grpc.ClientConnInterface
   315  }
   316  
   317  func NewLoggingClient(cc grpc.ClientConnInterface) LoggingClient {
   318  	return &loggingClient{cc}
   319  }
   320  
   321  func (c *loggingClient) ReadLogs(ctx context.Context, opts ...grpc.CallOption) (Logging_ReadLogsClient, error) {
   322  	stream, err := c.cc.NewStream(ctx, &_Logging_serviceDesc.Streams[0], "/tast.core.Logging/ReadLogs", opts...)
   323  	if err != nil {
   324  		return nil, err
   325  	}
   326  	x := &loggingReadLogsClient{stream}
   327  	return x, nil
   328  }
   329  
   330  type Logging_ReadLogsClient interface {
   331  	Send(*ReadLogsRequest) error
   332  	Recv() (*ReadLogsResponse, error)
   333  	grpc.ClientStream
   334  }
   335  
   336  type loggingReadLogsClient struct {
   337  	grpc.ClientStream
   338  }
   339  
   340  func (x *loggingReadLogsClient) Send(m *ReadLogsRequest) error {
   341  	return x.ClientStream.SendMsg(m)
   342  }
   343  
   344  func (x *loggingReadLogsClient) Recv() (*ReadLogsResponse, error) {
   345  	m := new(ReadLogsResponse)
   346  	if err := x.ClientStream.RecvMsg(m); err != nil {
   347  		return nil, err
   348  	}
   349  	return m, nil
   350  }
   351  
   352  // LoggingServer is the server API for Logging service.
   353  type LoggingServer interface {
   354  	// ReadLogs subscribes to logs emitted by gRPC services.
   355  	// At the beginning of the call, one ReadLogsResponse with empty entry is
   356  	// sent to indicate success of subscription. Afterwards ReadLogsResponse is
   357  	// sent back as a stream as logs are emitted. The response stream is closed
   358  	// when the client closes the request stream or any error occurs.
   359  	// At most one client can have an active call of this method at a time.
   360  	ReadLogs(Logging_ReadLogsServer) error
   361  }
   362  
   363  // UnimplementedLoggingServer can be embedded to have forward compatible implementations.
   364  type UnimplementedLoggingServer struct {
   365  }
   366  
   367  func (*UnimplementedLoggingServer) ReadLogs(Logging_ReadLogsServer) error {
   368  	return status.Errorf(codes.Unimplemented, "method ReadLogs not implemented")
   369  }
   370  
   371  func RegisterLoggingServer(s *grpc.Server, srv LoggingServer) {
   372  	s.RegisterService(&_Logging_serviceDesc, srv)
   373  }
   374  
   375  func _Logging_ReadLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
   376  	return srv.(LoggingServer).ReadLogs(&loggingReadLogsServer{stream})
   377  }
   378  
   379  type Logging_ReadLogsServer interface {
   380  	Send(*ReadLogsResponse) error
   381  	Recv() (*ReadLogsRequest, error)
   382  	grpc.ServerStream
   383  }
   384  
   385  type loggingReadLogsServer struct {
   386  	grpc.ServerStream
   387  }
   388  
   389  func (x *loggingReadLogsServer) Send(m *ReadLogsResponse) error {
   390  	return x.ServerStream.SendMsg(m)
   391  }
   392  
   393  func (x *loggingReadLogsServer) Recv() (*ReadLogsRequest, error) {
   394  	m := new(ReadLogsRequest)
   395  	if err := x.ServerStream.RecvMsg(m); err != nil {
   396  		return nil, err
   397  	}
   398  	return m, nil
   399  }
   400  
   401  var _Logging_serviceDesc = grpc.ServiceDesc{
   402  	ServiceName: "tast.core.Logging",
   403  	HandlerType: (*LoggingServer)(nil),
   404  	Methods:     []grpc.MethodDesc{},
   405  	Streams: []grpc.StreamDesc{
   406  		{
   407  			StreamName:    "ReadLogs",
   408  			Handler:       _Logging_ReadLogs_Handler,
   409  			ServerStreams: true,
   410  			ClientStreams: true,
   411  		},
   412  	},
   413  	Metadata: "logging.proto",
   414  }