blob: bb17a34a9d9122579e338fdfacd302975dd1ac41 [file] [log] [blame]
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.1.0
// - protoc v3.17.0
// source: go.chromium.org/luci/cv/api/diagnostic/diagnostic.proto
package diagnosticpb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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
// DiagnosticClient is the client API for Diagnostic 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 DiagnosticClient interface {
// GetProject returns current Project state.
GetProject(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*GetProjectResponse, error)
// GetRun returns current Run state.
GetRun(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*GetRunResponse, error)
// GetCL returns current CL state.
GetCL(ctx context.Context, in *GetCLRequest, opts ...grpc.CallOption) (*GetCLResponse, error)
// GetPoller returns current Poller state.
GetPoller(ctx context.Context, in *GetPollerRequest, opts ...grpc.CallOption) (*GetPollerResponse, error)
// DeleteProjectEvents deletes all outstanding project events.
// Must be called with stopped TQs.
// TODO(tandrii): delete this Temporary API.
DeleteProjectEvents(ctx context.Context, in *DeleteProjectEventsRequest, opts ...grpc.CallOption) (*DeleteProjectEventsResponse, error)
// RefreshProjectCLs refreshes all CLs currently tracked by PM.
RefreshProjectCLs(ctx context.Context, in *RefreshProjectCLsRequest, opts ...grpc.CallOption) (*RefreshProjectCLsResponse, error)
// SendProjectEvent sends event to a PM.
SendProjectEvent(ctx context.Context, in *SendProjectEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// SendRunEvent sends event to a RM.
SendRunEvent(ctx context.Context, in *SendRunEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type diagnosticClient struct {
cc grpc.ClientConnInterface
}
func NewDiagnosticClient(cc grpc.ClientConnInterface) DiagnosticClient {
return &diagnosticClient{cc}
}
func (c *diagnosticClient) GetProject(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*GetProjectResponse, error) {
out := new(GetProjectResponse)
err := c.cc.Invoke(ctx, "/diagnostic.Diagnostic/GetProject", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diagnosticClient) GetRun(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*GetRunResponse, error) {
out := new(GetRunResponse)
err := c.cc.Invoke(ctx, "/diagnostic.Diagnostic/GetRun", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diagnosticClient) GetCL(ctx context.Context, in *GetCLRequest, opts ...grpc.CallOption) (*GetCLResponse, error) {
out := new(GetCLResponse)
err := c.cc.Invoke(ctx, "/diagnostic.Diagnostic/GetCL", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diagnosticClient) GetPoller(ctx context.Context, in *GetPollerRequest, opts ...grpc.CallOption) (*GetPollerResponse, error) {
out := new(GetPollerResponse)
err := c.cc.Invoke(ctx, "/diagnostic.Diagnostic/GetPoller", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diagnosticClient) DeleteProjectEvents(ctx context.Context, in *DeleteProjectEventsRequest, opts ...grpc.CallOption) (*DeleteProjectEventsResponse, error) {
out := new(DeleteProjectEventsResponse)
err := c.cc.Invoke(ctx, "/diagnostic.Diagnostic/DeleteProjectEvents", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diagnosticClient) RefreshProjectCLs(ctx context.Context, in *RefreshProjectCLsRequest, opts ...grpc.CallOption) (*RefreshProjectCLsResponse, error) {
out := new(RefreshProjectCLsResponse)
err := c.cc.Invoke(ctx, "/diagnostic.Diagnostic/RefreshProjectCLs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diagnosticClient) SendProjectEvent(ctx context.Context, in *SendProjectEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/diagnostic.Diagnostic/SendProjectEvent", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *diagnosticClient) SendRunEvent(ctx context.Context, in *SendRunEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/diagnostic.Diagnostic/SendRunEvent", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DiagnosticServer is the server API for Diagnostic service.
// All implementations must embed UnimplementedDiagnosticServer
// for forward compatibility
type DiagnosticServer interface {
// GetProject returns current Project state.
GetProject(context.Context, *GetProjectRequest) (*GetProjectResponse, error)
// GetRun returns current Run state.
GetRun(context.Context, *GetRunRequest) (*GetRunResponse, error)
// GetCL returns current CL state.
GetCL(context.Context, *GetCLRequest) (*GetCLResponse, error)
// GetPoller returns current Poller state.
GetPoller(context.Context, *GetPollerRequest) (*GetPollerResponse, error)
// DeleteProjectEvents deletes all outstanding project events.
// Must be called with stopped TQs.
// TODO(tandrii): delete this Temporary API.
DeleteProjectEvents(context.Context, *DeleteProjectEventsRequest) (*DeleteProjectEventsResponse, error)
// RefreshProjectCLs refreshes all CLs currently tracked by PM.
RefreshProjectCLs(context.Context, *RefreshProjectCLsRequest) (*RefreshProjectCLsResponse, error)
// SendProjectEvent sends event to a PM.
SendProjectEvent(context.Context, *SendProjectEventRequest) (*emptypb.Empty, error)
// SendRunEvent sends event to a RM.
SendRunEvent(context.Context, *SendRunEventRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedDiagnosticServer()
}
// UnimplementedDiagnosticServer must be embedded to have forward compatible implementations.
type UnimplementedDiagnosticServer struct {
}
func (UnimplementedDiagnosticServer) GetProject(context.Context, *GetProjectRequest) (*GetProjectResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetProject not implemented")
}
func (UnimplementedDiagnosticServer) GetRun(context.Context, *GetRunRequest) (*GetRunResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRun not implemented")
}
func (UnimplementedDiagnosticServer) GetCL(context.Context, *GetCLRequest) (*GetCLResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCL not implemented")
}
func (UnimplementedDiagnosticServer) GetPoller(context.Context, *GetPollerRequest) (*GetPollerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPoller not implemented")
}
func (UnimplementedDiagnosticServer) DeleteProjectEvents(context.Context, *DeleteProjectEventsRequest) (*DeleteProjectEventsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteProjectEvents not implemented")
}
func (UnimplementedDiagnosticServer) RefreshProjectCLs(context.Context, *RefreshProjectCLsRequest) (*RefreshProjectCLsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RefreshProjectCLs not implemented")
}
func (UnimplementedDiagnosticServer) SendProjectEvent(context.Context, *SendProjectEventRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendProjectEvent not implemented")
}
func (UnimplementedDiagnosticServer) SendRunEvent(context.Context, *SendRunEventRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendRunEvent not implemented")
}
func (UnimplementedDiagnosticServer) mustEmbedUnimplementedDiagnosticServer() {}
// UnsafeDiagnosticServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DiagnosticServer will
// result in compilation errors.
type UnsafeDiagnosticServer interface {
mustEmbedUnimplementedDiagnosticServer()
}
func RegisterDiagnosticServer(s grpc.ServiceRegistrar, srv DiagnosticServer) {
s.RegisterService(&Diagnostic_ServiceDesc, srv)
}
func _Diagnostic_GetProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProjectRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticServer).GetProject(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/diagnostic.Diagnostic/GetProject",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticServer).GetProject(ctx, req.(*GetProjectRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Diagnostic_GetRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRunRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticServer).GetRun(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/diagnostic.Diagnostic/GetRun",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticServer).GetRun(ctx, req.(*GetRunRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Diagnostic_GetCL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCLRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticServer).GetCL(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/diagnostic.Diagnostic/GetCL",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticServer).GetCL(ctx, req.(*GetCLRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Diagnostic_GetPoller_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPollerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticServer).GetPoller(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/diagnostic.Diagnostic/GetPoller",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticServer).GetPoller(ctx, req.(*GetPollerRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Diagnostic_DeleteProjectEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteProjectEventsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticServer).DeleteProjectEvents(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/diagnostic.Diagnostic/DeleteProjectEvents",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticServer).DeleteProjectEvents(ctx, req.(*DeleteProjectEventsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Diagnostic_RefreshProjectCLs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RefreshProjectCLsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticServer).RefreshProjectCLs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/diagnostic.Diagnostic/RefreshProjectCLs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticServer).RefreshProjectCLs(ctx, req.(*RefreshProjectCLsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Diagnostic_SendProjectEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendProjectEventRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticServer).SendProjectEvent(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/diagnostic.Diagnostic/SendProjectEvent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticServer).SendProjectEvent(ctx, req.(*SendProjectEventRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Diagnostic_SendRunEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendRunEventRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiagnosticServer).SendRunEvent(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/diagnostic.Diagnostic/SendRunEvent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiagnosticServer).SendRunEvent(ctx, req.(*SendRunEventRequest))
}
return interceptor(ctx, in, info, handler)
}
// Diagnostic_ServiceDesc is the grpc.ServiceDesc for Diagnostic service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Diagnostic_ServiceDesc = grpc.ServiceDesc{
ServiceName: "diagnostic.Diagnostic",
HandlerType: (*DiagnosticServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetProject",
Handler: _Diagnostic_GetProject_Handler,
},
{
MethodName: "GetRun",
Handler: _Diagnostic_GetRun_Handler,
},
{
MethodName: "GetCL",
Handler: _Diagnostic_GetCL_Handler,
},
{
MethodName: "GetPoller",
Handler: _Diagnostic_GetPoller_Handler,
},
{
MethodName: "DeleteProjectEvents",
Handler: _Diagnostic_DeleteProjectEvents_Handler,
},
{
MethodName: "RefreshProjectCLs",
Handler: _Diagnostic_RefreshProjectCLs_Handler,
},
{
MethodName: "SendProjectEvent",
Handler: _Diagnostic_SendProjectEvent_Handler,
},
{
MethodName: "SendRunEvent",
Handler: _Diagnostic_SendRunEvent_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/cv/api/diagnostic/diagnostic.proto",
}