From fcf64d6d9383f0d9ad7d651218c4b22f386bd0f1 Mon Sep 17 00:00:00 2001 From: carla Date: Thu, 5 Mar 2020 11:52:05 +0200 Subject: [PATCH] multi: rename trmrpc to gvnrpc --- Makefile | 2 +- cmd/trmcli/channel_insights.go | 6 +- cmd/trmcli/close_recommendations.go | 30 +-- cmd/trmcli/revenue_report.go | 4 +- cmd/trmcli/utils.go | 8 +- governator.go | 8 +- {trmrpc => gvnrpc}/README.md | 6 +- {trmrpc => gvnrpc}/channel_insights.go | 2 +- {trmrpc => gvnrpc}/close_recommendations.go | 2 +- {trmrpc => gvnrpc}/gen_protos.sh | 2 +- {trmrpc => gvnrpc}/log.go | 2 +- {trmrpc => gvnrpc}/revenue_report.go | 2 +- {trmrpc => gvnrpc}/rpc.pb.go | 230 ++++++++++---------- {trmrpc => gvnrpc}/rpc.proto | 4 +- {trmrpc => gvnrpc}/rpcserver.go | 12 +- log.go | 4 +- 16 files changed, 162 insertions(+), 162 deletions(-) rename {trmrpc => gvnrpc}/README.md (69%) rename {trmrpc => gvnrpc}/channel_insights.go (99%) rename {trmrpc => gvnrpc}/close_recommendations.go (99%) rename {trmrpc => gvnrpc}/gen_protos.sh (82%) rename {trmrpc => gvnrpc}/log.go (97%) rename {trmrpc => gvnrpc}/revenue_report.go (99%) rename {trmrpc => gvnrpc}/rpc.pb.go (79%) rename {trmrpc => gvnrpc}/rpc.proto (99%) rename {trmrpc => gvnrpc}/rpcserver.go (93%) diff --git a/Makefile b/Makefile index 36f42a2..6c7e694 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,7 @@ goveralls: $(GOVERALLS_BIN) rpc: @$(call print, "Compiling protos.") - cd ./trmrpc; ./gen_protos.sh + cd ./gvnrpc; ./gen_protos.sh travis-race: lint unit-race diff --git a/cmd/trmcli/channel_insights.go b/cmd/trmcli/channel_insights.go index c31e24a..f0288e5 100644 --- a/cmd/trmcli/channel_insights.go +++ b/cmd/trmcli/channel_insights.go @@ -3,7 +3,7 @@ package main import ( "context" - "github.com/lightninglabs/governator/trmrpc" + "github.com/lightninglabs/governator/gvnrpc" "github.com/urfave/cli" ) @@ -18,7 +18,7 @@ var channelInsightsCommand = cli.Command{ // insightsResp is used to display additional information that is calculated // from the channel insight in the cli response. type insightsResp struct { - *trmrpc.ChannelInsight + *gvnrpc.ChannelInsight UptimeRatio float64 `json:"uptime_ratio"` RevenuePerConfirmation float64 `json:"revenue_per_conf_msat"` VolumePerConfirmation float64 `json:"volume_per_conf_msat"` @@ -32,7 +32,7 @@ func queryChannelInsights(ctx *cli.Context) error { rpcCtx := context.Background() resp, err := client.ChannelInsights( - rpcCtx, &trmrpc.ChannelInsightsRequest{}, + rpcCtx, &gvnrpc.ChannelInsightsRequest{}, ) if err != nil { return err diff --git a/cmd/trmcli/close_recommendations.go b/cmd/trmcli/close_recommendations.go index 19d4743..035bc7d 100644 --- a/cmd/trmcli/close_recommendations.go +++ b/cmd/trmcli/close_recommendations.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/lightninglabs/governator/trmrpc" + "github.com/lightninglabs/governator/gvnrpc" "github.com/urfave/cli" ) @@ -110,8 +110,8 @@ func queryThresholdRecommendations(ctx *cli.Context) error { // Set monitored value from cli values, this value will always be // non-zero because the flag has a default. - req := &trmrpc.ThresholdRecommendationsRequest{ - RecRequest: &trmrpc.CloseRecommendationRequest{ + req := &gvnrpc.ThresholdRecommendationsRequest{ + RecRequest: &gvnrpc.CloseRecommendationRequest{ MinimumMonitored: ctx.Int64("min_monitored"), }, } @@ -120,23 +120,23 @@ func queryThresholdRecommendations(ctx *cli.Context) error { switch { case ctx.IsSet("uptime"): req.ThresholdValue = float32(ctx.Float64("uptime")) - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_UPTIME + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_UPTIME case ctx.IsSet("revenue"): req.ThresholdValue = float32(ctx.Float64("revenue")) - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_REVENUE + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_REVENUE case ctx.IsSet("incoming"): req.ThresholdValue = float32(ctx.Float64("incoming")) - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_INCOMING_VOLUME + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_INCOMING_VOLUME case ctx.IsSet("outgoing"): req.ThresholdValue = float32(ctx.Float64("outgoing")) - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_OUTGOING_VOLUME + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_OUTGOING_VOLUME case ctx.IsSet("volume"): req.ThresholdValue = float32(ctx.Float64("volume")) - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_TOTAL_VOLUME + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_TOTAL_VOLUME default: return fmt.Errorf("threshold required") @@ -170,8 +170,8 @@ func queryOutlierRecommendations(ctx *cli.Context) error { // outlier multiplier will be overwritten if the user provided it, and // the monitored value will always be non-zero because the flag has a // default value. - req := &trmrpc.OutlierRecommendationsRequest{ - RecRequest: &trmrpc.CloseRecommendationRequest{ + req := &gvnrpc.OutlierRecommendationsRequest{ + RecRequest: &gvnrpc.CloseRecommendationRequest{ MinimumMonitored: ctx.Int64("min_monitored"), }, OutlierMultiplier: float32(defaultOutlierMultiplier), @@ -185,19 +185,19 @@ func queryOutlierRecommendations(ctx *cli.Context) error { // Set metric based on uptime or revenue flags. switch { case ctx.IsSet("uptime"): - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_UPTIME + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_UPTIME case ctx.IsSet("revenue"): - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_REVENUE + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_REVENUE case ctx.IsSet("incoming_volume"): - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_INCOMING_VOLUME + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_INCOMING_VOLUME case ctx.IsSet("outgoing_volume"): - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_OUTGOING_VOLUME + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_OUTGOING_VOLUME case ctx.IsSet("volume"): - req.RecRequest.Metric = trmrpc.CloseRecommendationRequest_TOTAL_VOLUME + req.RecRequest.Metric = gvnrpc.CloseRecommendationRequest_TOTAL_VOLUME default: return fmt.Errorf("uptime, revenue or volume realted flag " + diff --git a/cmd/trmcli/revenue_report.go b/cmd/trmcli/revenue_report.go index 9a4cbb5..26fb06a 100644 --- a/cmd/trmcli/revenue_report.go +++ b/cmd/trmcli/revenue_report.go @@ -3,7 +3,7 @@ package main import ( "context" - "github.com/lightninglabs/governator/trmrpc" + "github.com/lightninglabs/governator/gvnrpc" "github.com/urfave/cli" ) @@ -48,7 +48,7 @@ func queryRevenueReport(ctx *cli.Context) error { // Set start and end times from user specified values, defaulting // to zero if they are not set. - req := &trmrpc.RevenueReportRequest{ + req := &gvnrpc.RevenueReportRequest{ StartTime: uint64(ctx.Int64("start_time")), EndTime: uint64(ctx.Int64("end_time")), } diff --git a/cmd/trmcli/utils.go b/cmd/trmcli/utils.go index 12b00ca..98ad15c 100644 --- a/cmd/trmcli/utils.go +++ b/cmd/trmcli/utils.go @@ -8,7 +8,7 @@ import ( "net" "os" - "github.com/lightninglabs/governator/trmrpc" + "github.com/lightninglabs/governator/gvnrpc" "github.com/lightninglabs/protobuf-hex-display/jsonpb" "github.com/lightninglabs/protobuf-hex-display/proto" "github.com/lightningnetwork/lnd/lncfg" @@ -57,8 +57,8 @@ func printJSON(resp interface{}) { _, _ = out.WriteTo(os.Stdout) } -// getClient returns a terminator client. -func getClient(ctx *cli.Context) (trmrpc.TerminatorServerClient, func()) { +// getClient returns a governator client. +func getClient(ctx *cli.Context) (gvnrpc.GovernatorServerClient, func()) { conn := getClientConn(ctx) cleanUp := func() { @@ -67,7 +67,7 @@ func getClient(ctx *cli.Context) (trmrpc.TerminatorServerClient, func()) { } } - return trmrpc.NewTerminatorServerClient(conn), cleanUp + return gvnrpc.NewGovernatorServerClient(conn), cleanUp } // getClientConn gets a client connection to the address provided by the diff --git a/governator.go b/governator.go index 647fbf4..bb07d28 100644 --- a/governator.go +++ b/governator.go @@ -4,7 +4,7 @@ package governator import ( "fmt" - "github.com/lightninglabs/governator/trmrpc" + "github.com/lightninglabs/governator/gvnrpc" "github.com/lightninglabs/loop/lndclient" "github.com/lightningnetwork/lnd/signal" ) @@ -30,9 +30,9 @@ func Main() error { err) } - // Instantiate the terminator gRPC server. - server := trmrpc.NewRPCServer( - &trmrpc.Config{ + // Instantiate the governator gRPC server. + server := gvnrpc.NewRPCServer( + &gvnrpc.Config{ LightningClient: client, RPCListen: config.RPCListen, }, diff --git a/trmrpc/README.md b/gvnrpc/README.md similarity index 69% rename from trmrpc/README.md rename to gvnrpc/README.md index 499115f..c41e0cf 100644 --- a/trmrpc/README.md +++ b/gvnrpc/README.md @@ -1,8 +1,8 @@ -trmrpc +gvrpc ===== -This package implements terminator's RPC client and server. +This package implements governator's RPC client and server. ## Generate protobuf definitions 1. Follow the installation steps provided in lnd's [installation instructions](https://github.com/lightningnetwork/lnd/blob/master/lnrpc/README.md#generate-protobuf-definitions). -2. Run [`gen_protos.sh`](https://github.com/lightninglabs/governator/tree/master/trmrpc/gen_protos.sh) to generate new protobuf definitions. +2. Run [`gen_protos.sh`](https://github.com/lightninglabs/governator/tree/master/gvnrpc/gen_protos.sh) to generate new protobuf definitions. diff --git a/trmrpc/channel_insights.go b/gvnrpc/channel_insights.go similarity index 99% rename from trmrpc/channel_insights.go rename to gvnrpc/channel_insights.go index c3d803c..f33e846 100644 --- a/trmrpc/channel_insights.go +++ b/gvnrpc/channel_insights.go @@ -1,4 +1,4 @@ -package trmrpc +package gvnrpc import ( "context" diff --git a/trmrpc/close_recommendations.go b/gvnrpc/close_recommendations.go similarity index 99% rename from trmrpc/close_recommendations.go rename to gvnrpc/close_recommendations.go index 0e98e3a..4ed439b 100644 --- a/trmrpc/close_recommendations.go +++ b/gvnrpc/close_recommendations.go @@ -1,4 +1,4 @@ -package trmrpc +package gvnrpc import ( "context" diff --git a/trmrpc/gen_protos.sh b/gvnrpc/gen_protos.sh similarity index 82% rename from trmrpc/gen_protos.sh rename to gvnrpc/gen_protos.sh index 7f49a2f..5a44359 100755 --- a/trmrpc/gen_protos.sh +++ b/gvnrpc/gen_protos.sh @@ -1,6 +1,6 @@ #!/bin/sh -echo "Generating terminator gRPC server protos" +echo "Generating governator gRPC server protos" # Generate the protos. protoc -I/usr/local/include -I. \ diff --git a/trmrpc/log.go b/gvnrpc/log.go similarity index 97% rename from trmrpc/log.go rename to gvnrpc/log.go index cb0b538..dfdc404 100644 --- a/trmrpc/log.go +++ b/gvnrpc/log.go @@ -1,4 +1,4 @@ -package trmrpc +package gvnrpc import ( "github.com/btcsuite/btclog" diff --git a/trmrpc/revenue_report.go b/gvnrpc/revenue_report.go similarity index 99% rename from trmrpc/revenue_report.go rename to gvnrpc/revenue_report.go index 652917b..82ceb33 100644 --- a/trmrpc/revenue_report.go +++ b/gvnrpc/revenue_report.go @@ -1,4 +1,4 @@ -package trmrpc +package gvnrpc import ( "context" diff --git a/trmrpc/rpc.pb.go b/gvnrpc/rpc.pb.go similarity index 79% rename from trmrpc/rpc.pb.go rename to gvnrpc/rpc.pb.go index d4b7c8b..5d5f441 100644 --- a/trmrpc/rpc.pb.go +++ b/gvnrpc/rpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: rpc.proto -package trmrpc +package gvnrpc import ( context "context" @@ -72,7 +72,7 @@ type CloseRecommendationRequest struct { //monitored to. //Revenue: the revenue that the channel has produced per block that its //funding transaction has been confirmed for. - Metric CloseRecommendationRequest_Metric `protobuf:"varint,2,opt,name=metric,proto3,enum=trmrpc.CloseRecommendationRequest_Metric" json:"metric,omitempty"` + Metric CloseRecommendationRequest_Metric `protobuf:"varint,2,opt,name=metric,proto3,enum=gvnrpc.CloseRecommendationRequest_Metric" json:"metric,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -796,85 +796,85 @@ func (m *ChannelInsight) GetPrivate() bool { } func init() { - proto.RegisterEnum("trmrpc.CloseRecommendationRequest_Metric", CloseRecommendationRequest_Metric_name, CloseRecommendationRequest_Metric_value) - proto.RegisterType((*CloseRecommendationRequest)(nil), "trmrpc.CloseRecommendationRequest") - proto.RegisterType((*OutlierRecommendationsRequest)(nil), "trmrpc.OutlierRecommendationsRequest") - proto.RegisterType((*ThresholdRecommendationsRequest)(nil), "trmrpc.ThresholdRecommendationsRequest") - proto.RegisterType((*CloseRecommendationsResponse)(nil), "trmrpc.CloseRecommendationsResponse") - proto.RegisterType((*Recommendation)(nil), "trmrpc.Recommendation") - proto.RegisterType((*RevenueReportRequest)(nil), "trmrpc.RevenueReportRequest") - proto.RegisterType((*RevenueReportResponse)(nil), "trmrpc.RevenueReportResponse") - proto.RegisterType((*RevenueReport)(nil), "trmrpc.RevenueReport") - proto.RegisterMapType((map[string]*PairReport)(nil), "trmrpc.RevenueReport.PairReportsEntry") - proto.RegisterType((*PairReport)(nil), "trmrpc.PairReport") - proto.RegisterType((*ChannelInsightsRequest)(nil), "trmrpc.ChannelInsightsRequest") - proto.RegisterType((*ChannelInsightsResponse)(nil), "trmrpc.ChannelInsightsResponse") - proto.RegisterType((*ChannelInsight)(nil), "trmrpc.ChannelInsight") + proto.RegisterEnum("gvnrpc.CloseRecommendationRequest_Metric", CloseRecommendationRequest_Metric_name, CloseRecommendationRequest_Metric_value) + proto.RegisterType((*CloseRecommendationRequest)(nil), "gvnrpc.CloseRecommendationRequest") + proto.RegisterType((*OutlierRecommendationsRequest)(nil), "gvnrpc.OutlierRecommendationsRequest") + proto.RegisterType((*ThresholdRecommendationsRequest)(nil), "gvnrpc.ThresholdRecommendationsRequest") + proto.RegisterType((*CloseRecommendationsResponse)(nil), "gvnrpc.CloseRecommendationsResponse") + proto.RegisterType((*Recommendation)(nil), "gvnrpc.Recommendation") + proto.RegisterType((*RevenueReportRequest)(nil), "gvnrpc.RevenueReportRequest") + proto.RegisterType((*RevenueReportResponse)(nil), "gvnrpc.RevenueReportResponse") + proto.RegisterType((*RevenueReport)(nil), "gvnrpc.RevenueReport") + proto.RegisterMapType((map[string]*PairReport)(nil), "gvnrpc.RevenueReport.PairReportsEntry") + proto.RegisterType((*PairReport)(nil), "gvnrpc.PairReport") + proto.RegisterType((*ChannelInsightsRequest)(nil), "gvnrpc.ChannelInsightsRequest") + proto.RegisterType((*ChannelInsightsResponse)(nil), "gvnrpc.ChannelInsightsResponse") + proto.RegisterType((*ChannelInsight)(nil), "gvnrpc.ChannelInsight") } func init() { proto.RegisterFile("rpc.proto", fileDescriptor_77a6da22d6a3feb1) } var fileDescriptor_77a6da22d6a3feb1 = []byte{ // 944 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xc7, 0x71, 0x9b, 0xb6, 0x2f, 0x9b, 0xd4, 0x3b, 0xdb, 0x2d, 0xa1, 0x6a, 0x69, 0x64, 0xed, - 0xb2, 0x41, 0x40, 0xba, 0x0a, 0x17, 0xc4, 0x89, 0xaa, 0x8a, 0x96, 0x88, 0x26, 0xa9, 0x66, 0x93, - 0x72, 0x41, 0xb2, 0x8c, 0x33, 0x9b, 0x0e, 0xc4, 0x33, 0xde, 0xf1, 0x38, 0xd2, 0x7e, 0x01, 0xae, - 0x1c, 0xf8, 0x32, 0x7c, 0x08, 0x2e, 0x1c, 0xf8, 0x2e, 0x1c, 0xd1, 0xfc, 0xb1, 0x1d, 0x87, 0x74, - 0xcb, 0x85, 0x9b, 0xe7, 0xf7, 0xfb, 0xcd, 0xfb, 0xcd, 0xbc, 0xf7, 0x32, 0x2f, 0x70, 0x20, 0x92, - 0xa8, 0x97, 0x08, 0x2e, 0x39, 0xaa, 0x4b, 0x11, 0x8b, 0x24, 0x3a, 0x39, 0x5d, 0x70, 0xbe, 0x58, - 0x92, 0x8b, 0x30, 0xa1, 0x17, 0x21, 0x63, 0x5c, 0x86, 0x92, 0x72, 0x96, 0x1a, 0x95, 0xff, 0xb7, - 0x03, 0x27, 0x57, 0x4b, 0x9e, 0x12, 0x4c, 0x22, 0x1e, 0xc7, 0x84, 0xcd, 0x35, 0x8d, 0xc9, 0xdb, - 0x8c, 0xa4, 0x12, 0x7d, 0x06, 0x8f, 0x63, 0xca, 0x68, 0x9c, 0xc5, 0x41, 0xcc, 0x19, 0x95, 0x5c, - 0x90, 0x79, 0xdb, 0xe9, 0x38, 0x5d, 0x17, 0x7b, 0x96, 0x18, 0xe5, 0x38, 0xba, 0x84, 0x7a, 0x4c, - 0xa4, 0xa0, 0x51, 0xbb, 0xd6, 0x71, 0xba, 0xad, 0xfe, 0xa7, 0x3d, 0x73, 0x84, 0xde, 0xfd, 0x06, - 0xbd, 0x91, 0xde, 0x80, 0xed, 0x46, 0xff, 0x27, 0xa8, 0x1b, 0x04, 0x35, 0x60, 0x6f, 0x36, 0xfe, - 0x6e, 0x3c, 0xf9, 0x7e, 0xec, 0x7d, 0x80, 0x00, 0xea, 0xb3, 0x9b, 0xe9, 0x70, 0x34, 0xf0, 0x1c, - 0x45, 0xe0, 0xc1, 0xed, 0x60, 0x3c, 0x1b, 0x78, 0x35, 0xf4, 0x04, 0x0e, 0x87, 0xe3, 0xab, 0xc9, - 0x68, 0x38, 0x7e, 0x15, 0xdc, 0x4e, 0xae, 0x67, 0xa3, 0x81, 0xe7, 0x2a, 0x70, 0x32, 0x9b, 0xbe, - 0x9a, 0xac, 0x81, 0x3b, 0xc8, 0x83, 0x47, 0xd3, 0xc9, 0xf4, 0xf2, 0x3a, 0x47, 0x76, 0xfd, 0xdf, - 0x1c, 0x38, 0x9b, 0x64, 0x72, 0x49, 0x89, 0xa8, 0x9e, 0x2d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2a, 0x88, 0xda, - 0xb0, 0x97, 0x08, 0xba, 0x0a, 0x25, 0x69, 0xef, 0xeb, 0x67, 0x23, 0x5f, 0xf6, 0x7f, 0x71, 0xc1, - 0x9b, 0x12, 0x11, 0x53, 0x16, 0x4a, 0x2e, 0x5e, 0x13, 0xb1, 0x22, 0x02, 0x11, 0x38, 0xde, 0x3e, - 0x96, 0xd0, 0xf3, 0xbc, 0x56, 0xef, 0x1d, 0x5b, 0x27, 0xcf, 0xde, 0x33, 0x09, 0xca, 0x96, 0xa0, - 0xd0, 0xbe, 0x6f, 0xce, 0xa0, 0x17, 0x79, 0x84, 0x07, 0x26, 0xd1, 0x7f, 0xb4, 0xba, 0xde, 0x7c, - 0x58, 0x4e, 0xb7, 0x3f, 0x45, 0x36, 0xe8, 0xd9, 0x3d, 0xac, 0x8d, 0x86, 0xe1, 0x70, 0xa3, 0xcd, - 0xd1, 0xc7, 0xdb, 0x9b, 0xb8, 0x38, 0xe6, 0xf9, 0xbd, 0xbc, 0x89, 0xf9, 0x63, 0x5d, 0xff, 0x1b, - 0xfa, 0xf2, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0xdf, 0x60, 0xc4, 0x40, 0x09, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0xc6, 0x71, 0x9b, 0x34, 0x2f, 0x9b, 0xc4, 0x3b, 0xdb, 0x2d, 0xa1, 0x6a, 0x69, 0x64, 0xed, + 0xb2, 0x41, 0x40, 0xba, 0x0a, 0x17, 0xc4, 0x89, 0xaa, 0x8a, 0x4a, 0x44, 0x93, 0x54, 0xb3, 0x49, + 0xb9, 0x20, 0x59, 0xc6, 0x99, 0x4d, 0x07, 0xe2, 0x19, 0xef, 0x78, 0x1c, 0x69, 0xff, 0x00, 0x57, + 0x0e, 0xfc, 0x19, 0x7e, 0x04, 0x17, 0x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x7b, 0xa0, 0xb2, 0xee, + 0x11, 0x5f, 0x30, 0xb2, 0xd0, 0xea, 0xaa, 0x52, 0xb7, 0x52, 0x7c, 0xa8, 0x60, 0xa5, 0x7c, 0x01, + 0xcd, 0x80, 0xb3, 0xb7, 0x54, 0x84, 0xe6, 0x7d, 0xaa, 0x75, 0xad, 0x5e, 0x13, 0x97, 0x41, 0xd4, + 0x81, 0x5a, 0x24, 0xe8, 0xda, 0x97, 0xa4, 0x73, 0xa0, 0x9e, 0x8d, 0x6c, 0x39, 0xf8, 0xc5, 0x06, + 0xe7, 0x8a, 0xaf, 0x89, 0x60, 0xbe, 0xe4, 0xe2, 0x0d, 0x11, 0x6b, 0x22, 0x10, 0x81, 0xa3, 0xdd, + 0x63, 0x09, 0xbd, 0xcc, 0x6a, 0xf5, 0xe0, 0xd8, 0x3a, 0x7e, 0xf1, 0xc0, 0x24, 0x28, 0x5a, 0x82, + 0x42, 0xe7, 0xbe, 0x39, 0x83, 0x5e, 0x65, 0x11, 0x1e, 0x99, 0x44, 0xff, 0xd1, 0xea, 0x7a, 0xfb, + 0x61, 0x39, 0xd9, 0xfd, 0x14, 0x99, 0xa0, 0xa7, 0xf7, 0xb0, 0x26, 0x1a, 0x86, 0xf6, 0x56, 0x9b, + 0xa3, 0x8f, 0x77, 0x37, 0x71, 0x7e, 0xcc, 0xb3, 0x7b, 0x79, 0x1d, 0xf3, 0xc7, 0xaa, 0xfa, 0x37, + 0xf4, 0xe5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x9a, 0x34, 0x4e, 0x40, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -885,163 +885,163 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// TerminatorServerClient is the client API for TerminatorServer service. +// GovernatorServerClient is the client API for GovernatorServer service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TerminatorServerClient interface { +type GovernatorServerClient interface { OutlierRecommendations(ctx context.Context, in *OutlierRecommendationsRequest, opts ...grpc.CallOption) (*CloseRecommendationsResponse, error) ThresholdRecommendations(ctx context.Context, in *ThresholdRecommendationsRequest, opts ...grpc.CallOption) (*CloseRecommendationsResponse, error) RevenueReport(ctx context.Context, in *RevenueReportRequest, opts ...grpc.CallOption) (*RevenueReportResponse, error) ChannelInsights(ctx context.Context, in *ChannelInsightsRequest, opts ...grpc.CallOption) (*ChannelInsightsResponse, error) } -type terminatorServerClient struct { +type governatorServerClient struct { cc *grpc.ClientConn } -func NewTerminatorServerClient(cc *grpc.ClientConn) TerminatorServerClient { - return &terminatorServerClient{cc} +func NewGovernatorServerClient(cc *grpc.ClientConn) GovernatorServerClient { + return &governatorServerClient{cc} } -func (c *terminatorServerClient) OutlierRecommendations(ctx context.Context, in *OutlierRecommendationsRequest, opts ...grpc.CallOption) (*CloseRecommendationsResponse, error) { +func (c *governatorServerClient) OutlierRecommendations(ctx context.Context, in *OutlierRecommendationsRequest, opts ...grpc.CallOption) (*CloseRecommendationsResponse, error) { out := new(CloseRecommendationsResponse) - err := c.cc.Invoke(ctx, "/trmrpc.TerminatorServer/OutlierRecommendations", in, out, opts...) + err := c.cc.Invoke(ctx, "/gvnrpc.GovernatorServer/OutlierRecommendations", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *terminatorServerClient) ThresholdRecommendations(ctx context.Context, in *ThresholdRecommendationsRequest, opts ...grpc.CallOption) (*CloseRecommendationsResponse, error) { +func (c *governatorServerClient) ThresholdRecommendations(ctx context.Context, in *ThresholdRecommendationsRequest, opts ...grpc.CallOption) (*CloseRecommendationsResponse, error) { out := new(CloseRecommendationsResponse) - err := c.cc.Invoke(ctx, "/trmrpc.TerminatorServer/ThresholdRecommendations", in, out, opts...) + err := c.cc.Invoke(ctx, "/gvnrpc.GovernatorServer/ThresholdRecommendations", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *terminatorServerClient) RevenueReport(ctx context.Context, in *RevenueReportRequest, opts ...grpc.CallOption) (*RevenueReportResponse, error) { +func (c *governatorServerClient) RevenueReport(ctx context.Context, in *RevenueReportRequest, opts ...grpc.CallOption) (*RevenueReportResponse, error) { out := new(RevenueReportResponse) - err := c.cc.Invoke(ctx, "/trmrpc.TerminatorServer/RevenueReport", in, out, opts...) + err := c.cc.Invoke(ctx, "/gvnrpc.GovernatorServer/RevenueReport", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *terminatorServerClient) ChannelInsights(ctx context.Context, in *ChannelInsightsRequest, opts ...grpc.CallOption) (*ChannelInsightsResponse, error) { +func (c *governatorServerClient) ChannelInsights(ctx context.Context, in *ChannelInsightsRequest, opts ...grpc.CallOption) (*ChannelInsightsResponse, error) { out := new(ChannelInsightsResponse) - err := c.cc.Invoke(ctx, "/trmrpc.TerminatorServer/ChannelInsights", in, out, opts...) + err := c.cc.Invoke(ctx, "/gvnrpc.GovernatorServer/ChannelInsights", in, out, opts...) if err != nil { return nil, err } return out, nil } -// TerminatorServerServer is the server API for TerminatorServer service. -type TerminatorServerServer interface { +// GovernatorServerServer is the server API for GovernatorServer service. +type GovernatorServerServer interface { OutlierRecommendations(context.Context, *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error) ThresholdRecommendations(context.Context, *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error) RevenueReport(context.Context, *RevenueReportRequest) (*RevenueReportResponse, error) ChannelInsights(context.Context, *ChannelInsightsRequest) (*ChannelInsightsResponse, error) } -func RegisterTerminatorServerServer(s *grpc.Server, srv TerminatorServerServer) { - s.RegisterService(&_TerminatorServer_serviceDesc, srv) +func RegisterGovernatorServerServer(s *grpc.Server, srv GovernatorServerServer) { + s.RegisterService(&_GovernatorServer_serviceDesc, srv) } -func _TerminatorServer_OutlierRecommendations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _GovernatorServer_OutlierRecommendations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OutlierRecommendationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TerminatorServerServer).OutlierRecommendations(ctx, in) + return srv.(GovernatorServerServer).OutlierRecommendations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/trmrpc.TerminatorServer/OutlierRecommendations", + FullMethod: "/gvnrpc.GovernatorServer/OutlierRecommendations", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TerminatorServerServer).OutlierRecommendations(ctx, req.(*OutlierRecommendationsRequest)) + return srv.(GovernatorServerServer).OutlierRecommendations(ctx, req.(*OutlierRecommendationsRequest)) } return interceptor(ctx, in, info, handler) } -func _TerminatorServer_ThresholdRecommendations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _GovernatorServer_ThresholdRecommendations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ThresholdRecommendationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TerminatorServerServer).ThresholdRecommendations(ctx, in) + return srv.(GovernatorServerServer).ThresholdRecommendations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/trmrpc.TerminatorServer/ThresholdRecommendations", + FullMethod: "/gvnrpc.GovernatorServer/ThresholdRecommendations", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TerminatorServerServer).ThresholdRecommendations(ctx, req.(*ThresholdRecommendationsRequest)) + return srv.(GovernatorServerServer).ThresholdRecommendations(ctx, req.(*ThresholdRecommendationsRequest)) } return interceptor(ctx, in, info, handler) } -func _TerminatorServer_RevenueReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _GovernatorServer_RevenueReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RevenueReportRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TerminatorServerServer).RevenueReport(ctx, in) + return srv.(GovernatorServerServer).RevenueReport(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/trmrpc.TerminatorServer/RevenueReport", + FullMethod: "/gvnrpc.GovernatorServer/RevenueReport", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TerminatorServerServer).RevenueReport(ctx, req.(*RevenueReportRequest)) + return srv.(GovernatorServerServer).RevenueReport(ctx, req.(*RevenueReportRequest)) } return interceptor(ctx, in, info, handler) } -func _TerminatorServer_ChannelInsights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _GovernatorServer_ChannelInsights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ChannelInsightsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TerminatorServerServer).ChannelInsights(ctx, in) + return srv.(GovernatorServerServer).ChannelInsights(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/trmrpc.TerminatorServer/ChannelInsights", + FullMethod: "/gvnrpc.GovernatorServer/ChannelInsights", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TerminatorServerServer).ChannelInsights(ctx, req.(*ChannelInsightsRequest)) + return srv.(GovernatorServerServer).ChannelInsights(ctx, req.(*ChannelInsightsRequest)) } return interceptor(ctx, in, info, handler) } -var _TerminatorServer_serviceDesc = grpc.ServiceDesc{ - ServiceName: "trmrpc.TerminatorServer", - HandlerType: (*TerminatorServerServer)(nil), +var _GovernatorServer_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gvnrpc.GovernatorServer", + HandlerType: (*GovernatorServerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "OutlierRecommendations", - Handler: _TerminatorServer_OutlierRecommendations_Handler, + Handler: _GovernatorServer_OutlierRecommendations_Handler, }, { MethodName: "ThresholdRecommendations", - Handler: _TerminatorServer_ThresholdRecommendations_Handler, + Handler: _GovernatorServer_ThresholdRecommendations_Handler, }, { MethodName: "RevenueReport", - Handler: _TerminatorServer_RevenueReport_Handler, + Handler: _GovernatorServer_RevenueReport_Handler, }, { MethodName: "ChannelInsights", - Handler: _TerminatorServer_ChannelInsights_Handler, + Handler: _GovernatorServer_ChannelInsights_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/trmrpc/rpc.proto b/gvnrpc/rpc.proto similarity index 99% rename from trmrpc/rpc.proto rename to gvnrpc/rpc.proto index c6338fd..13b6db3 100644 --- a/trmrpc/rpc.proto +++ b/gvnrpc/rpc.proto @@ -2,9 +2,9 @@ syntax = "proto3"; import "google/api/annotations.proto"; -package trmrpc; +package gvnrpc; -service TerminatorServer { +service GovernatorServer { rpc OutlierRecommendations (OutlierRecommendationsRequest) returns (CloseRecommendationsResponse); rpc ThresholdRecommendations (ThresholdRecommendationsRequest) returns (CloseRecommendationsResponse); rpc RevenueReport (RevenueReportRequest) returns (RevenueReportResponse); diff --git a/trmrpc/rpcserver.go b/gvnrpc/rpcserver.go similarity index 93% rename from trmrpc/rpcserver.go rename to gvnrpc/rpcserver.go index 9828f97..54a05d4 100644 --- a/trmrpc/rpcserver.go +++ b/gvnrpc/rpcserver.go @@ -1,14 +1,14 @@ -// Package trmrpc contains the proto files, generated code and server logic -// for the terminator's grpc server which serves requests for close +// Package gvrpc contains the proto files, generated code and server logic +// for the governator's grpc server which serves requests for close // recommendations. // -// The Terminator server interface is implemented by the RPCServer struct. +// The Governator server interface is implemented by the RPCServer struct. // To keep this file readable, each function implemented by the interface // has a file named after the function call which contains rpc parsing // code for the request and response. If the call requires extensive // additional logic, and unexported function with the same name should // be created in this file as well. -package trmrpc +package gvnrpc import ( "context" @@ -23,7 +23,7 @@ import ( "google.golang.org/grpc" ) -// RPCServer implements the terminator service, serving requests over grpc. +// RPCServer implements the governator service, serving requests over grpc. type RPCServer struct { // To be used atomically. started int32 @@ -103,7 +103,7 @@ func (s *RPCServer) Start() error { } s.rpcListener = grpcListener - RegisterTerminatorServerServer(s.grpcServer, s) + RegisterGovernatorServerServer(s.grpcServer, s) s.wg.Add(1) go func() { diff --git a/log.go b/log.go index 116a42c..c740efa 100644 --- a/log.go +++ b/log.go @@ -3,9 +3,9 @@ package governator import ( "github.com/btcsuite/btclog" "github.com/lightninglabs/governator/dataset" + "github.com/lightninglabs/governator/gvnrpc" "github.com/lightninglabs/governator/recommend" "github.com/lightninglabs/governator/revenue" - "github.com/lightninglabs/governator/trmrpc" "github.com/lightningnetwork/lnd/build" ) @@ -26,7 +26,7 @@ func init() { setSubLogger(Subsystem, log, nil) addSubLogger(recommend.Subsystem, recommend.UseLogger) addSubLogger(dataset.Subsystem, dataset.UseLogger) - addSubLogger(trmrpc.Subsystem, trmrpc.UseLogger) + addSubLogger(gvnrpc.Subsystem, gvnrpc.UseLogger) addSubLogger(revenue.Subsystem, revenue.UseLogger) }