• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 13408822928

19 Feb 2025 08:59AM UTC coverage: 41.123% (-17.7%) from 58.794%
13408822928

Pull #9521

github

web-flow
Merge d2f397b3c into 0e8786348
Pull Request #9521: unit: remove GOACC, use Go 1.20 native coverage functionality

92496 of 224923 relevant lines covered (41.12%)

18825.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lnrpc/autopilotrpc/autopilot_grpc.pb.go
1
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2

3
package autopilotrpc
4

5
import (
6
        context "context"
7
        grpc "google.golang.org/grpc"
8
        codes "google.golang.org/grpc/codes"
9
        status "google.golang.org/grpc/status"
10
)
11

12
// This is a compile-time assertion to ensure that this generated file
13
// is compatible with the grpc package it is being compiled against.
14
// Requires gRPC-Go v1.32.0 or later.
15
const _ = grpc.SupportPackageIsVersion7
16

17
// AutopilotClient is the client API for Autopilot service.
18
//
19
// 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.
20
type AutopilotClient interface {
21
        // lncli: `autopilot status`
22
        // Status returns whether the daemon's autopilot agent is active.
23
        Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
24
        // ModifyStatus is used to modify the status of the autopilot agent, like
25
        // enabling or disabling it.
26
        ModifyStatus(ctx context.Context, in *ModifyStatusRequest, opts ...grpc.CallOption) (*ModifyStatusResponse, error)
27
        // lncli: `autopilot query`
28
        // QueryScores queries all available autopilot heuristics, in addition to any
29
        // active combination of these heruristics, for the scores they would give to
30
        // the given nodes.
31
        QueryScores(ctx context.Context, in *QueryScoresRequest, opts ...grpc.CallOption) (*QueryScoresResponse, error)
32
        // SetScores attempts to set the scores used by the running autopilot agent,
33
        // if the external scoring heuristic is enabled.
34
        SetScores(ctx context.Context, in *SetScoresRequest, opts ...grpc.CallOption) (*SetScoresResponse, error)
35
}
36

37
type autopilotClient struct {
38
        cc grpc.ClientConnInterface
39
}
40

41
func NewAutopilotClient(cc grpc.ClientConnInterface) AutopilotClient {
×
42
        return &autopilotClient{cc}
×
43
}
×
44

45
func (c *autopilotClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
×
46
        out := new(StatusResponse)
×
47
        err := c.cc.Invoke(ctx, "/autopilotrpc.Autopilot/Status", in, out, opts...)
×
48
        if err != nil {
×
49
                return nil, err
×
50
        }
×
51
        return out, nil
×
52
}
53

54
func (c *autopilotClient) ModifyStatus(ctx context.Context, in *ModifyStatusRequest, opts ...grpc.CallOption) (*ModifyStatusResponse, error) {
×
55
        out := new(ModifyStatusResponse)
×
56
        err := c.cc.Invoke(ctx, "/autopilotrpc.Autopilot/ModifyStatus", in, out, opts...)
×
57
        if err != nil {
×
58
                return nil, err
×
59
        }
×
60
        return out, nil
×
61
}
62

63
func (c *autopilotClient) QueryScores(ctx context.Context, in *QueryScoresRequest, opts ...grpc.CallOption) (*QueryScoresResponse, error) {
×
64
        out := new(QueryScoresResponse)
×
65
        err := c.cc.Invoke(ctx, "/autopilotrpc.Autopilot/QueryScores", in, out, opts...)
×
66
        if err != nil {
×
67
                return nil, err
×
68
        }
×
69
        return out, nil
×
70
}
71

72
func (c *autopilotClient) SetScores(ctx context.Context, in *SetScoresRequest, opts ...grpc.CallOption) (*SetScoresResponse, error) {
×
73
        out := new(SetScoresResponse)
×
74
        err := c.cc.Invoke(ctx, "/autopilotrpc.Autopilot/SetScores", in, out, opts...)
×
75
        if err != nil {
×
76
                return nil, err
×
77
        }
×
78
        return out, nil
×
79
}
80

81
// AutopilotServer is the server API for Autopilot service.
82
// All implementations must embed UnimplementedAutopilotServer
83
// for forward compatibility
84
type AutopilotServer interface {
85
        // lncli: `autopilot status`
86
        // Status returns whether the daemon's autopilot agent is active.
87
        Status(context.Context, *StatusRequest) (*StatusResponse, error)
88
        // ModifyStatus is used to modify the status of the autopilot agent, like
89
        // enabling or disabling it.
90
        ModifyStatus(context.Context, *ModifyStatusRequest) (*ModifyStatusResponse, error)
91
        // lncli: `autopilot query`
92
        // QueryScores queries all available autopilot heuristics, in addition to any
93
        // active combination of these heruristics, for the scores they would give to
94
        // the given nodes.
95
        QueryScores(context.Context, *QueryScoresRequest) (*QueryScoresResponse, error)
96
        // SetScores attempts to set the scores used by the running autopilot agent,
97
        // if the external scoring heuristic is enabled.
98
        SetScores(context.Context, *SetScoresRequest) (*SetScoresResponse, error)
99
        mustEmbedUnimplementedAutopilotServer()
100
}
101

102
// UnimplementedAutopilotServer must be embedded to have forward compatible implementations.
103
type UnimplementedAutopilotServer struct {
104
}
105

106
func (UnimplementedAutopilotServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) {
×
107
        return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
×
108
}
×
109
func (UnimplementedAutopilotServer) ModifyStatus(context.Context, *ModifyStatusRequest) (*ModifyStatusResponse, error) {
×
110
        return nil, status.Errorf(codes.Unimplemented, "method ModifyStatus not implemented")
×
111
}
×
112
func (UnimplementedAutopilotServer) QueryScores(context.Context, *QueryScoresRequest) (*QueryScoresResponse, error) {
×
113
        return nil, status.Errorf(codes.Unimplemented, "method QueryScores not implemented")
×
114
}
×
115
func (UnimplementedAutopilotServer) SetScores(context.Context, *SetScoresRequest) (*SetScoresResponse, error) {
×
116
        return nil, status.Errorf(codes.Unimplemented, "method SetScores not implemented")
×
117
}
×
118
func (UnimplementedAutopilotServer) mustEmbedUnimplementedAutopilotServer() {}
×
119

120
// UnsafeAutopilotServer may be embedded to opt out of forward compatibility for this service.
121
// Use of this interface is not recommended, as added methods to AutopilotServer will
122
// result in compilation errors.
123
type UnsafeAutopilotServer interface {
124
        mustEmbedUnimplementedAutopilotServer()
125
}
126

127
func RegisterAutopilotServer(s grpc.ServiceRegistrar, srv AutopilotServer) {
×
128
        s.RegisterService(&Autopilot_ServiceDesc, srv)
×
129
}
×
130

131
func _Autopilot_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
132
        in := new(StatusRequest)
×
133
        if err := dec(in); err != nil {
×
134
                return nil, err
×
135
        }
×
136
        if interceptor == nil {
×
137
                return srv.(AutopilotServer).Status(ctx, in)
×
138
        }
×
139
        info := &grpc.UnaryServerInfo{
×
140
                Server:     srv,
×
141
                FullMethod: "/autopilotrpc.Autopilot/Status",
×
142
        }
×
143
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
144
                return srv.(AutopilotServer).Status(ctx, req.(*StatusRequest))
×
145
        }
×
146
        return interceptor(ctx, in, info, handler)
×
147
}
148

149
func _Autopilot_ModifyStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
150
        in := new(ModifyStatusRequest)
×
151
        if err := dec(in); err != nil {
×
152
                return nil, err
×
153
        }
×
154
        if interceptor == nil {
×
155
                return srv.(AutopilotServer).ModifyStatus(ctx, in)
×
156
        }
×
157
        info := &grpc.UnaryServerInfo{
×
158
                Server:     srv,
×
159
                FullMethod: "/autopilotrpc.Autopilot/ModifyStatus",
×
160
        }
×
161
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
162
                return srv.(AutopilotServer).ModifyStatus(ctx, req.(*ModifyStatusRequest))
×
163
        }
×
164
        return interceptor(ctx, in, info, handler)
×
165
}
166

167
func _Autopilot_QueryScores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
168
        in := new(QueryScoresRequest)
×
169
        if err := dec(in); err != nil {
×
170
                return nil, err
×
171
        }
×
172
        if interceptor == nil {
×
173
                return srv.(AutopilotServer).QueryScores(ctx, in)
×
174
        }
×
175
        info := &grpc.UnaryServerInfo{
×
176
                Server:     srv,
×
177
                FullMethod: "/autopilotrpc.Autopilot/QueryScores",
×
178
        }
×
179
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
180
                return srv.(AutopilotServer).QueryScores(ctx, req.(*QueryScoresRequest))
×
181
        }
×
182
        return interceptor(ctx, in, info, handler)
×
183
}
184

185
func _Autopilot_SetScores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
186
        in := new(SetScoresRequest)
×
187
        if err := dec(in); err != nil {
×
188
                return nil, err
×
189
        }
×
190
        if interceptor == nil {
×
191
                return srv.(AutopilotServer).SetScores(ctx, in)
×
192
        }
×
193
        info := &grpc.UnaryServerInfo{
×
194
                Server:     srv,
×
195
                FullMethod: "/autopilotrpc.Autopilot/SetScores",
×
196
        }
×
197
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
198
                return srv.(AutopilotServer).SetScores(ctx, req.(*SetScoresRequest))
×
199
        }
×
200
        return interceptor(ctx, in, info, handler)
×
201
}
202

203
// Autopilot_ServiceDesc is the grpc.ServiceDesc for Autopilot service.
204
// It's only intended for direct use with grpc.RegisterService,
205
// and not to be introspected or modified (even as a copy)
206
var Autopilot_ServiceDesc = grpc.ServiceDesc{
207
        ServiceName: "autopilotrpc.Autopilot",
208
        HandlerType: (*AutopilotServer)(nil),
209
        Methods: []grpc.MethodDesc{
210
                {
211
                        MethodName: "Status",
212
                        Handler:    _Autopilot_Status_Handler,
213
                },
214
                {
215
                        MethodName: "ModifyStatus",
216
                        Handler:    _Autopilot_ModifyStatus_Handler,
217
                },
218
                {
219
                        MethodName: "QueryScores",
220
                        Handler:    _Autopilot_QueryScores_Handler,
221
                },
222
                {
223
                        MethodName: "SetScores",
224
                        Handler:    _Autopilot_SetScores_Handler,
225
                },
226
        },
227
        Streams:  []grpc.StreamDesc{},
228
        Metadata: "autopilotrpc/autopilot.proto",
229
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc