Documentation
¶
Overview ¶
Package frdrpc contains the proto files, generated code and server logic for faraday's grpc server which serves requests for close recommendations.
The Faraday 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.
Index ¶
- Constants
- Variables
- func RegisterFaradayServerServer(s *grpc.Server, srv FaradayServerServer)
- func UseLogger(logger btclog.Logger)
- type ChannelInsight
- func (*ChannelInsight) Descriptor() ([]byte, []int)
- func (m *ChannelInsight) GetChanPoint() string
- func (m *ChannelInsight) GetConfirmations() uint32
- func (m *ChannelInsight) GetFeesEarnedMsat() int64
- func (m *ChannelInsight) GetMonitoredSeconds() uint64
- func (m *ChannelInsight) GetPrivate() bool
- func (m *ChannelInsight) GetUptimeSeconds() uint64
- func (m *ChannelInsight) GetVolumeIncomingMsat() int64
- func (m *ChannelInsight) GetVolumeOutgoingMsat() int64
- func (*ChannelInsight) ProtoMessage()
- func (m *ChannelInsight) Reset()
- func (m *ChannelInsight) String() string
- func (m *ChannelInsight) XXX_DiscardUnknown()
- func (m *ChannelInsight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChannelInsight) XXX_Merge(src proto.Message)
- func (m *ChannelInsight) XXX_Size() int
- func (m *ChannelInsight) XXX_Unmarshal(b []byte) error
- type ChannelInsightsRequest
- func (*ChannelInsightsRequest) Descriptor() ([]byte, []int)
- func (*ChannelInsightsRequest) ProtoMessage()
- func (m *ChannelInsightsRequest) Reset()
- func (m *ChannelInsightsRequest) String() string
- func (m *ChannelInsightsRequest) XXX_DiscardUnknown()
- func (m *ChannelInsightsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChannelInsightsRequest) XXX_Merge(src proto.Message)
- func (m *ChannelInsightsRequest) XXX_Size() int
- func (m *ChannelInsightsRequest) XXX_Unmarshal(b []byte) error
- type ChannelInsightsResponse
- func (*ChannelInsightsResponse) Descriptor() ([]byte, []int)
- func (m *ChannelInsightsResponse) GetChannelInsights() []*ChannelInsight
- func (*ChannelInsightsResponse) ProtoMessage()
- func (m *ChannelInsightsResponse) Reset()
- func (m *ChannelInsightsResponse) String() string
- func (m *ChannelInsightsResponse) XXX_DiscardUnknown()
- func (m *ChannelInsightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChannelInsightsResponse) XXX_Merge(src proto.Message)
- func (m *ChannelInsightsResponse) XXX_Size() int
- func (m *ChannelInsightsResponse) XXX_Unmarshal(b []byte) error
- type CloseRecommendationRequest
- func (*CloseRecommendationRequest) Descriptor() ([]byte, []int)
- func (m *CloseRecommendationRequest) GetMetric() CloseRecommendationRequest_Metric
- func (m *CloseRecommendationRequest) GetMinimumMonitored() int64
- func (*CloseRecommendationRequest) ProtoMessage()
- func (m *CloseRecommendationRequest) Reset()
- func (m *CloseRecommendationRequest) String() string
- func (m *CloseRecommendationRequest) XXX_DiscardUnknown()
- func (m *CloseRecommendationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseRecommendationRequest) XXX_Merge(src proto.Message)
- func (m *CloseRecommendationRequest) XXX_Size() int
- func (m *CloseRecommendationRequest) XXX_Unmarshal(b []byte) error
- type CloseRecommendationRequest_Metric
- type CloseRecommendationsResponse
- func (*CloseRecommendationsResponse) Descriptor() ([]byte, []int)
- func (m *CloseRecommendationsResponse) GetConsideredChannels() int32
- func (m *CloseRecommendationsResponse) GetRecommendations() []*Recommendation
- func (m *CloseRecommendationsResponse) GetTotalChannels() int32
- func (*CloseRecommendationsResponse) ProtoMessage()
- func (m *CloseRecommendationsResponse) Reset()
- func (m *CloseRecommendationsResponse) String() string
- func (m *CloseRecommendationsResponse) XXX_DiscardUnknown()
- func (m *CloseRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CloseRecommendationsResponse) XXX_Merge(src proto.Message)
- func (m *CloseRecommendationsResponse) XXX_Size() int
- func (m *CloseRecommendationsResponse) XXX_Unmarshal(b []byte) error
- type Config
- type FaradayServerClient
- type FaradayServerServer
- type OutlierRecommendationsRequest
- func (*OutlierRecommendationsRequest) Descriptor() ([]byte, []int)
- func (m *OutlierRecommendationsRequest) GetOutlierMultiplier() float32
- func (m *OutlierRecommendationsRequest) GetRecRequest() *CloseRecommendationRequest
- func (*OutlierRecommendationsRequest) ProtoMessage()
- func (m *OutlierRecommendationsRequest) Reset()
- func (m *OutlierRecommendationsRequest) String() string
- func (m *OutlierRecommendationsRequest) XXX_DiscardUnknown()
- func (m *OutlierRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OutlierRecommendationsRequest) XXX_Merge(src proto.Message)
- func (m *OutlierRecommendationsRequest) XXX_Size() int
- func (m *OutlierRecommendationsRequest) XXX_Unmarshal(b []byte) error
- type PairReport
- func (*PairReport) Descriptor() ([]byte, []int)
- func (m *PairReport) GetAmountIncomingMsat() int64
- func (m *PairReport) GetAmountOutgoingMsat() int64
- func (m *PairReport) GetFeesIncomingMsat() int64
- func (m *PairReport) GetFeesOutgoingMsat() int64
- func (*PairReport) ProtoMessage()
- func (m *PairReport) Reset()
- func (m *PairReport) String() string
- func (m *PairReport) XXX_DiscardUnknown()
- func (m *PairReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PairReport) XXX_Merge(src proto.Message)
- func (m *PairReport) XXX_Size() int
- func (m *PairReport) XXX_Unmarshal(b []byte) error
- type RPCServer
- func (s *RPCServer) ChannelInsights(ctx context.Context, req *ChannelInsightsRequest) (*ChannelInsightsResponse, error)
- func (s *RPCServer) OutlierRecommendations(ctx context.Context, req *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error)
- func (s *RPCServer) RevenueReport(ctx context.Context, req *RevenueReportRequest) (*RevenueReportResponse, error)
- func (s *RPCServer) Start() error
- func (s *RPCServer) Stop() error
- func (s *RPCServer) ThresholdRecommendations(ctx context.Context, req *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error)
- type Recommendation
- func (*Recommendation) Descriptor() ([]byte, []int)
- func (m *Recommendation) GetChanPoint() string
- func (m *Recommendation) GetRecommendClose() bool
- func (m *Recommendation) GetValue() float32
- func (*Recommendation) ProtoMessage()
- func (m *Recommendation) Reset()
- func (m *Recommendation) String() string
- func (m *Recommendation) XXX_DiscardUnknown()
- func (m *Recommendation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Recommendation) XXX_Merge(src proto.Message)
- func (m *Recommendation) XXX_Size() int
- func (m *Recommendation) XXX_Unmarshal(b []byte) error
- type RevenueReport
- func (*RevenueReport) Descriptor() ([]byte, []int)
- func (m *RevenueReport) GetPairReports() map[string]*PairReport
- func (m *RevenueReport) GetTargetChannel() string
- func (*RevenueReport) ProtoMessage()
- func (m *RevenueReport) Reset()
- func (m *RevenueReport) String() string
- func (m *RevenueReport) XXX_DiscardUnknown()
- func (m *RevenueReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RevenueReport) XXX_Merge(src proto.Message)
- func (m *RevenueReport) XXX_Size() int
- func (m *RevenueReport) XXX_Unmarshal(b []byte) error
- type RevenueReportRequest
- func (*RevenueReportRequest) Descriptor() ([]byte, []int)
- func (m *RevenueReportRequest) GetChanPoints() []string
- func (m *RevenueReportRequest) GetEndTime() uint64
- func (m *RevenueReportRequest) GetStartTime() uint64
- func (*RevenueReportRequest) ProtoMessage()
- func (m *RevenueReportRequest) Reset()
- func (m *RevenueReportRequest) String() string
- func (m *RevenueReportRequest) XXX_DiscardUnknown()
- func (m *RevenueReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RevenueReportRequest) XXX_Merge(src proto.Message)
- func (m *RevenueReportRequest) XXX_Size() int
- func (m *RevenueReportRequest) XXX_Unmarshal(b []byte) error
- type RevenueReportResponse
- func (*RevenueReportResponse) Descriptor() ([]byte, []int)
- func (m *RevenueReportResponse) GetReports() []*RevenueReport
- func (*RevenueReportResponse) ProtoMessage()
- func (m *RevenueReportResponse) Reset()
- func (m *RevenueReportResponse) String() string
- func (m *RevenueReportResponse) XXX_DiscardUnknown()
- func (m *RevenueReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RevenueReportResponse) XXX_Merge(src proto.Message)
- func (m *RevenueReportResponse) XXX_Size() int
- func (m *RevenueReportResponse) XXX_Unmarshal(b []byte) error
- type ThresholdRecommendationsRequest
- func (*ThresholdRecommendationsRequest) Descriptor() ([]byte, []int)
- func (m *ThresholdRecommendationsRequest) GetRecRequest() *CloseRecommendationRequest
- func (m *ThresholdRecommendationsRequest) GetThresholdValue() float32
- func (*ThresholdRecommendationsRequest) ProtoMessage()
- func (m *ThresholdRecommendationsRequest) Reset()
- func (m *ThresholdRecommendationsRequest) String() string
- func (m *ThresholdRecommendationsRequest) XXX_DiscardUnknown()
- func (m *ThresholdRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ThresholdRecommendationsRequest) XXX_Merge(src proto.Message)
- func (m *ThresholdRecommendationsRequest) XXX_Size() int
- func (m *ThresholdRecommendationsRequest) XXX_Unmarshal(b []byte) error
Constants ¶
const Subsystem = "FRPC"
Subsystem defines the logging code for this subsystem.
Variables ¶
var CloseRecommendationRequest_Metric_name = map[int32]string{
0: "UNKNOWN",
1: "UPTIME",
2: "REVENUE",
3: "INCOMING_VOLUME",
4: "OUTGOING_VOLUME",
5: "TOTAL_VOLUME",
}
var CloseRecommendationRequest_Metric_value = map[string]int32{
"UNKNOWN": 0,
"UPTIME": 1,
"REVENUE": 2,
"INCOMING_VOLUME": 3,
"OUTGOING_VOLUME": 4,
"TOTAL_VOLUME": 5,
}
Functions ¶
func RegisterFaradayServerServer ¶
func RegisterFaradayServerServer(s *grpc.Server, srv FaradayServerServer)
Types ¶
type ChannelInsight ¶
type ChannelInsight struct {
// The outpoint of the channel's funding transaction.
ChanPoint string `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
//
//The amount of time in seconds that we have monitored the channel peer's
//uptime for.
MonitoredSeconds uint64 `protobuf:"varint,2,opt,name=monitored_seconds,json=monitoredSeconds,proto3" json:"monitored_seconds,omitempty"`
//
//The amount of time in seconds that the channel peer has been online over
//the period it has been monitored for.
UptimeSeconds uint64 `protobuf:"varint,3,opt,name=uptime_seconds,json=uptimeSeconds,proto3" json:"uptime_seconds,omitempty"`
//
//The volume, in millisatoshis, that has been forwarded with this channel as
//the incoming channel.
VolumeIncomingMsat int64 `protobuf:"varint,4,opt,name=volume_incoming_msat,json=volumeIncomingMsat,proto3" json:"volume_incoming_msat,omitempty"`
//
//The volume, in millisatoshis, that has been forwarded with this channel as
//the outgoing channel.
VolumeOutgoingMsat int64 `protobuf:"varint,5,opt,name=volume_outgoing_msat,json=volumeOutgoingMsat,proto3" json:"volume_outgoing_msat,omitempty"`
//
//The total fees earned by this channel for its participation in forwards,
//expressed in millisatoshis. Note that we attribute fees evenly across
//incoming and outgoing channels.
FeesEarnedMsat int64 `protobuf:"varint,6,opt,name=fees_earned_msat,json=feesEarnedMsat,proto3" json:"fees_earned_msat,omitempty"`
// The number of confirmations the funding transaction has.
Confirmations uint32 `protobuf:"varint,7,opt,name=confirmations,proto3" json:"confirmations,omitempty"`
// True if the channel is private.
Private bool `protobuf:"varint,8,opt,name=private,proto3" json:"private,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ChannelInsight) Descriptor ¶
func (*ChannelInsight) Descriptor() ([]byte, []int)
func (*ChannelInsight) GetChanPoint ¶
func (m *ChannelInsight) GetChanPoint() string
func (*ChannelInsight) GetConfirmations ¶
func (m *ChannelInsight) GetConfirmations() uint32
func (*ChannelInsight) GetFeesEarnedMsat ¶
func (m *ChannelInsight) GetFeesEarnedMsat() int64
func (*ChannelInsight) GetMonitoredSeconds ¶
func (m *ChannelInsight) GetMonitoredSeconds() uint64
func (*ChannelInsight) GetPrivate ¶
func (m *ChannelInsight) GetPrivate() bool
func (*ChannelInsight) GetUptimeSeconds ¶
func (m *ChannelInsight) GetUptimeSeconds() uint64
func (*ChannelInsight) GetVolumeIncomingMsat ¶
func (m *ChannelInsight) GetVolumeIncomingMsat() int64
func (*ChannelInsight) GetVolumeOutgoingMsat ¶
func (m *ChannelInsight) GetVolumeOutgoingMsat() int64
func (*ChannelInsight) ProtoMessage ¶
func (*ChannelInsight) ProtoMessage()
func (*ChannelInsight) Reset ¶
func (m *ChannelInsight) Reset()
func (*ChannelInsight) String ¶
func (m *ChannelInsight) String() string
func (*ChannelInsight) XXX_DiscardUnknown ¶
func (m *ChannelInsight) XXX_DiscardUnknown()
func (*ChannelInsight) XXX_Marshal ¶
func (m *ChannelInsight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChannelInsight) XXX_Merge ¶
func (m *ChannelInsight) XXX_Merge(src proto.Message)
func (*ChannelInsight) XXX_Size ¶
func (m *ChannelInsight) XXX_Size() int
func (*ChannelInsight) XXX_Unmarshal ¶
func (m *ChannelInsight) XXX_Unmarshal(b []byte) error
type ChannelInsightsRequest ¶
type ChannelInsightsRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ChannelInsightsRequest) Descriptor ¶
func (*ChannelInsightsRequest) Descriptor() ([]byte, []int)
func (*ChannelInsightsRequest) ProtoMessage ¶
func (*ChannelInsightsRequest) ProtoMessage()
func (*ChannelInsightsRequest) Reset ¶
func (m *ChannelInsightsRequest) Reset()
func (*ChannelInsightsRequest) String ¶
func (m *ChannelInsightsRequest) String() string
func (*ChannelInsightsRequest) XXX_DiscardUnknown ¶
func (m *ChannelInsightsRequest) XXX_DiscardUnknown()
func (*ChannelInsightsRequest) XXX_Marshal ¶
func (m *ChannelInsightsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChannelInsightsRequest) XXX_Merge ¶
func (m *ChannelInsightsRequest) XXX_Merge(src proto.Message)
func (*ChannelInsightsRequest) XXX_Size ¶
func (m *ChannelInsightsRequest) XXX_Size() int
func (*ChannelInsightsRequest) XXX_Unmarshal ¶
func (m *ChannelInsightsRequest) XXX_Unmarshal(b []byte) error
type ChannelInsightsResponse ¶
type ChannelInsightsResponse struct {
// Insights for the set of currently open channels.
ChannelInsights []*ChannelInsight `protobuf:"bytes,1,rep,name=channel_insights,json=channelInsights,proto3" json:"channel_insights,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ChannelInsightsResponse) Descriptor ¶
func (*ChannelInsightsResponse) Descriptor() ([]byte, []int)
func (*ChannelInsightsResponse) GetChannelInsights ¶
func (m *ChannelInsightsResponse) GetChannelInsights() []*ChannelInsight
func (*ChannelInsightsResponse) ProtoMessage ¶
func (*ChannelInsightsResponse) ProtoMessage()
func (*ChannelInsightsResponse) Reset ¶
func (m *ChannelInsightsResponse) Reset()
func (*ChannelInsightsResponse) String ¶
func (m *ChannelInsightsResponse) String() string
func (*ChannelInsightsResponse) XXX_DiscardUnknown ¶
func (m *ChannelInsightsResponse) XXX_DiscardUnknown()
func (*ChannelInsightsResponse) XXX_Marshal ¶
func (m *ChannelInsightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChannelInsightsResponse) XXX_Merge ¶
func (m *ChannelInsightsResponse) XXX_Merge(src proto.Message)
func (*ChannelInsightsResponse) XXX_Size ¶
func (m *ChannelInsightsResponse) XXX_Size() int
func (*ChannelInsightsResponse) XXX_Unmarshal ¶
func (m *ChannelInsightsResponse) XXX_Unmarshal(b []byte) error
type CloseRecommendationRequest ¶
type CloseRecommendationRequest struct {
//
//The minimum amount of time in seconds that a channel should have been
//monitored by lnd to be eligible for close. This value is in place to
//protect against closing of newer channels.
MinimumMonitored int64 `protobuf:"varint,1,opt,name=minimum_monitored,json=minimumMonitored,proto3" json:"minimum_monitored,omitempty"`
//
//The data point base close recommendations on. Available options are:
//Uptime: ratio of channel peer's uptime to the period they have been
//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=frdrpc.CloseRecommendationRequest_Metric" json:"metric,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*CloseRecommendationRequest) Descriptor ¶
func (*CloseRecommendationRequest) Descriptor() ([]byte, []int)
func (*CloseRecommendationRequest) GetMetric ¶
func (m *CloseRecommendationRequest) GetMetric() CloseRecommendationRequest_Metric
func (*CloseRecommendationRequest) GetMinimumMonitored ¶
func (m *CloseRecommendationRequest) GetMinimumMonitored() int64
func (*CloseRecommendationRequest) ProtoMessage ¶
func (*CloseRecommendationRequest) ProtoMessage()
func (*CloseRecommendationRequest) Reset ¶
func (m *CloseRecommendationRequest) Reset()
func (*CloseRecommendationRequest) String ¶
func (m *CloseRecommendationRequest) String() string
func (*CloseRecommendationRequest) XXX_DiscardUnknown ¶
func (m *CloseRecommendationRequest) XXX_DiscardUnknown()
func (*CloseRecommendationRequest) XXX_Marshal ¶
func (m *CloseRecommendationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CloseRecommendationRequest) XXX_Merge ¶
func (m *CloseRecommendationRequest) XXX_Merge(src proto.Message)
func (*CloseRecommendationRequest) XXX_Size ¶
func (m *CloseRecommendationRequest) XXX_Size() int
func (*CloseRecommendationRequest) XXX_Unmarshal ¶
func (m *CloseRecommendationRequest) XXX_Unmarshal(b []byte) error
type CloseRecommendationRequest_Metric ¶
type CloseRecommendationRequest_Metric int32
const ( CloseRecommendationRequest_UNKNOWN CloseRecommendationRequest_Metric = 0 CloseRecommendationRequest_UPTIME CloseRecommendationRequest_Metric = 1 CloseRecommendationRequest_REVENUE CloseRecommendationRequest_Metric = 2 CloseRecommendationRequest_INCOMING_VOLUME CloseRecommendationRequest_Metric = 3 CloseRecommendationRequest_OUTGOING_VOLUME CloseRecommendationRequest_Metric = 4 CloseRecommendationRequest_TOTAL_VOLUME CloseRecommendationRequest_Metric = 5 )
func (CloseRecommendationRequest_Metric) EnumDescriptor ¶
func (CloseRecommendationRequest_Metric) EnumDescriptor() ([]byte, []int)
func (CloseRecommendationRequest_Metric) String ¶
func (x CloseRecommendationRequest_Metric) String() string
type CloseRecommendationsResponse ¶
type CloseRecommendationsResponse struct {
//
//The total number of channels, before filtering out channels that are
//not eligible for close recommendations.
TotalChannels int32 `protobuf:"varint,1,opt,name=total_channels,json=totalChannels,proto3" json:"total_channels,omitempty"`
//
//The number of channels that were considered for close recommendations.
ConsideredChannels int32 `protobuf:"varint,2,opt,name=considered_channels,json=consideredChannels,proto3" json:"considered_channels,omitempty"`
//
//A set of channel close recommendations. The absence of a channel in this
//set implies that it was not considered for close because it did not meet
//the criteria for close recommendations (it is private, or has not been
//monitored for long enough).
Recommendations []*Recommendation `protobuf:"bytes,3,rep,name=recommendations,proto3" json:"recommendations,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*CloseRecommendationsResponse) Descriptor ¶
func (*CloseRecommendationsResponse) Descriptor() ([]byte, []int)
func (*CloseRecommendationsResponse) GetConsideredChannels ¶
func (m *CloseRecommendationsResponse) GetConsideredChannels() int32
func (*CloseRecommendationsResponse) GetRecommendations ¶
func (m *CloseRecommendationsResponse) GetRecommendations() []*Recommendation
func (*CloseRecommendationsResponse) GetTotalChannels ¶
func (m *CloseRecommendationsResponse) GetTotalChannels() int32
func (*CloseRecommendationsResponse) ProtoMessage ¶
func (*CloseRecommendationsResponse) ProtoMessage()
func (*CloseRecommendationsResponse) Reset ¶
func (m *CloseRecommendationsResponse) Reset()
func (*CloseRecommendationsResponse) String ¶
func (m *CloseRecommendationsResponse) String() string
func (*CloseRecommendationsResponse) XXX_DiscardUnknown ¶
func (m *CloseRecommendationsResponse) XXX_DiscardUnknown()
func (*CloseRecommendationsResponse) XXX_Marshal ¶
func (m *CloseRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CloseRecommendationsResponse) XXX_Merge ¶
func (m *CloseRecommendationsResponse) XXX_Merge(src proto.Message)
func (*CloseRecommendationsResponse) XXX_Size ¶
func (m *CloseRecommendationsResponse) XXX_Size() int
func (*CloseRecommendationsResponse) XXX_Unmarshal ¶
func (m *CloseRecommendationsResponse) XXX_Unmarshal(b []byte) error
type Config ¶
type Config struct {
// LightningClient is a client which can be used to query lnd.
LightningClient lnrpc.LightningClient
// RPCListen is the address:port that the rpc server should listen
// on.
RPCListen string
}
Config provides closures and settings required to run the rpc server.
type FaradayServerClient ¶
type FaradayServerClient 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)
}
FaradayServerClient is the client API for FaradayServer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFaradayServerClient ¶
func NewFaradayServerClient(cc *grpc.ClientConn) FaradayServerClient
type FaradayServerServer ¶
type FaradayServerServer 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)
}
FaradayServerServer is the server API for FaradayServer service.
type OutlierRecommendationsRequest ¶
type OutlierRecommendationsRequest struct {
//
//The parameters that are common to all close recommendations.
RecRequest *CloseRecommendationRequest `protobuf:"bytes,1,opt,name=rec_request,json=recRequest,proto3" json:"rec_request,omitempty"`
//
//The number of inter-quartile ranges a value needs to be beneath the lower
//quartile/ above the upper quartile to be considered a lower/upper outlier.
//Lower values will be more aggressive in recommending channel closes, and
//upper values will be more conservative. Recommended values are 1.5 for
//aggressive recommendations and 3 for conservative recommendations.
OutlierMultiplier float32 `protobuf:"fixed32,2,opt,name=outlier_multiplier,json=outlierMultiplier,proto3" json:"outlier_multiplier,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*OutlierRecommendationsRequest) Descriptor ¶
func (*OutlierRecommendationsRequest) Descriptor() ([]byte, []int)
func (*OutlierRecommendationsRequest) GetOutlierMultiplier ¶
func (m *OutlierRecommendationsRequest) GetOutlierMultiplier() float32
func (*OutlierRecommendationsRequest) GetRecRequest ¶
func (m *OutlierRecommendationsRequest) GetRecRequest() *CloseRecommendationRequest
func (*OutlierRecommendationsRequest) ProtoMessage ¶
func (*OutlierRecommendationsRequest) ProtoMessage()
func (*OutlierRecommendationsRequest) Reset ¶
func (m *OutlierRecommendationsRequest) Reset()
func (*OutlierRecommendationsRequest) String ¶
func (m *OutlierRecommendationsRequest) String() string
func (*OutlierRecommendationsRequest) XXX_DiscardUnknown ¶
func (m *OutlierRecommendationsRequest) XXX_DiscardUnknown()
func (*OutlierRecommendationsRequest) XXX_Marshal ¶
func (m *OutlierRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OutlierRecommendationsRequest) XXX_Merge ¶
func (m *OutlierRecommendationsRequest) XXX_Merge(src proto.Message)
func (*OutlierRecommendationsRequest) XXX_Size ¶
func (m *OutlierRecommendationsRequest) XXX_Size() int
func (*OutlierRecommendationsRequest) XXX_Unmarshal ¶
func (m *OutlierRecommendationsRequest) XXX_Unmarshal(b []byte) error
type PairReport ¶
type PairReport struct {
//
//Amount outgoing msat is the amount in millisatoshis that arrived
//on the pair channel to be forwarded onwards by our channel.
AmountOutgoingMsat int64 `protobuf:"varint,1,opt,name=amount_outgoing_msat,json=amountOutgoingMsat,proto3" json:"amount_outgoing_msat,omitempty"`
//
//Fees outgoing is the amount of fees in millisatoshis that we
//attribute to the channel for its role as the outgoing channel in
//forwards.
FeesOutgoingMsat int64 `protobuf:"varint,2,opt,name=fees_outgoing_msat,json=feesOutgoingMsat,proto3" json:"fees_outgoing_msat,omitempty"`
//
//Amount incoming msat is the amount in millisatoshis that arrived
//on our channel to be forwarded onwards by the pair channel.
AmountIncomingMsat int64 `protobuf:"varint,3,opt,name=amount_incoming_msat,json=amountIncomingMsat,proto3" json:"amount_incoming_msat,omitempty"`
//
//Fees incoming is the amount of fees in millisatoshis that we
//attribute to the channel for its role as the incoming channel in
//forwards.
FeesIncomingMsat int64 `protobuf:"varint,4,opt,name=fees_incoming_msat,json=feesIncomingMsat,proto3" json:"fees_incoming_msat,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PairReport) Descriptor ¶
func (*PairReport) Descriptor() ([]byte, []int)
func (*PairReport) GetAmountIncomingMsat ¶
func (m *PairReport) GetAmountIncomingMsat() int64
func (*PairReport) GetAmountOutgoingMsat ¶
func (m *PairReport) GetAmountOutgoingMsat() int64
func (*PairReport) GetFeesIncomingMsat ¶
func (m *PairReport) GetFeesIncomingMsat() int64
func (*PairReport) GetFeesOutgoingMsat ¶
func (m *PairReport) GetFeesOutgoingMsat() int64
func (*PairReport) ProtoMessage ¶
func (*PairReport) ProtoMessage()
func (*PairReport) Reset ¶
func (m *PairReport) Reset()
func (*PairReport) String ¶
func (m *PairReport) String() string
func (*PairReport) XXX_DiscardUnknown ¶
func (m *PairReport) XXX_DiscardUnknown()
func (*PairReport) XXX_Marshal ¶
func (m *PairReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PairReport) XXX_Merge ¶
func (m *PairReport) XXX_Merge(src proto.Message)
func (*PairReport) XXX_Size ¶
func (m *PairReport) XXX_Size() int
func (*PairReport) XXX_Unmarshal ¶
func (m *PairReport) XXX_Unmarshal(b []byte) error
type RPCServer ¶
type RPCServer struct {
// contains filtered or unexported fields
}
RPCServer implements the faraday service, serving requests over grpc.
func NewRPCServer ¶
NewRPCServer returns a server which will listen for rpc requests on the rpc listen address provided. Note that the server returned is not running, and should be started using Start().
func (*RPCServer) ChannelInsights ¶
func (s *RPCServer) ChannelInsights(ctx context.Context, req *ChannelInsightsRequest) (*ChannelInsightsResponse, error)
ChannelInsights returns the channel insights for our currently open set of channels.
func (*RPCServer) OutlierRecommendations ¶
func (s *RPCServer) OutlierRecommendations(ctx context.Context, req *OutlierRecommendationsRequest) (*CloseRecommendationsResponse, error)
OutlierRecommendations provides a set of close recommendations for the current set of open channels based on whether they are outliers.
func (*RPCServer) RevenueReport ¶
func (s *RPCServer) RevenueReport(ctx context.Context, req *RevenueReportRequest) (*RevenueReportResponse, error)
RevenueReport returns a pairwise revenue report for a channel over the period requested.
func (*RPCServer) ThresholdRecommendations ¶
func (s *RPCServer) ThresholdRecommendations(ctx context.Context, req *ThresholdRecommendationsRequest) (*CloseRecommendationsResponse, error)
ThresholdRecommendations provides a set of close recommendations for the current set of open channels based on whether they are above or below a given threshold.
type Recommendation ¶
type Recommendation struct {
//
//The channel point [funding txid: outpoint] of the channel being considered
//for close.
ChanPoint string `protobuf:"bytes,1,opt,name=chan_point,json=chanPoint,proto3" json:"chan_point,omitempty"`
// The value of the metric that close recommendations were based on.
Value float32 `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"`
// A boolean indicating whether we recommend closing the channel.
RecommendClose bool `protobuf:"varint,3,opt,name=recommend_close,json=recommendClose,proto3" json:"recommend_close,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Recommendation) Descriptor ¶
func (*Recommendation) Descriptor() ([]byte, []int)
func (*Recommendation) GetChanPoint ¶
func (m *Recommendation) GetChanPoint() string
func (*Recommendation) GetRecommendClose ¶
func (m *Recommendation) GetRecommendClose() bool
func (*Recommendation) GetValue ¶
func (m *Recommendation) GetValue() float32
func (*Recommendation) ProtoMessage ¶
func (*Recommendation) ProtoMessage()
func (*Recommendation) Reset ¶
func (m *Recommendation) Reset()
func (*Recommendation) String ¶
func (m *Recommendation) String() string
func (*Recommendation) XXX_DiscardUnknown ¶
func (m *Recommendation) XXX_DiscardUnknown()
func (*Recommendation) XXX_Marshal ¶
func (m *Recommendation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Recommendation) XXX_Merge ¶
func (m *Recommendation) XXX_Merge(src proto.Message)
func (*Recommendation) XXX_Size ¶
func (m *Recommendation) XXX_Size() int
func (*Recommendation) XXX_Unmarshal ¶
func (m *Recommendation) XXX_Unmarshal(b []byte) error
type RevenueReport ¶
type RevenueReport struct {
//
//Target channel is the channel that the report is generated for; incoming
//fields in the report mean that this channel was the incoming channel,
//and the pair as the outgoing, outgoing fields mean that this channel was
//the outgoing channel and the peer was the incoming channel.
TargetChannel string `protobuf:"bytes,1,opt,name=target_channel,json=targetChannel,proto3" json:"target_channel,omitempty"`
//
//Pair reports maps the channel point of a peer that we generated revenue
//with to a report detailing the revenue.
PairReports map[string]*PairReport `` /* 182-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*RevenueReport) Descriptor ¶
func (*RevenueReport) Descriptor() ([]byte, []int)
func (*RevenueReport) GetPairReports ¶
func (m *RevenueReport) GetPairReports() map[string]*PairReport
func (*RevenueReport) GetTargetChannel ¶
func (m *RevenueReport) GetTargetChannel() string
func (*RevenueReport) ProtoMessage ¶
func (*RevenueReport) ProtoMessage()
func (*RevenueReport) Reset ¶
func (m *RevenueReport) Reset()
func (*RevenueReport) String ¶
func (m *RevenueReport) String() string
func (*RevenueReport) XXX_DiscardUnknown ¶
func (m *RevenueReport) XXX_DiscardUnknown()
func (*RevenueReport) XXX_Marshal ¶
func (m *RevenueReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RevenueReport) XXX_Merge ¶
func (m *RevenueReport) XXX_Merge(src proto.Message)
func (*RevenueReport) XXX_Size ¶
func (m *RevenueReport) XXX_Size() int
func (*RevenueReport) XXX_Unmarshal ¶
func (m *RevenueReport) XXX_Unmarshal(b []byte) error
type RevenueReportRequest ¶
type RevenueReportRequest struct {
//
//The funding transaction outpoints for the channels to generate a revenue
//report for. If this is empty, it will be generated for all open and closed
//channels. Channel funding points should be expressed with the format
//fundingTxID:outpoint.
ChanPoints []string `protobuf:"bytes,1,rep,name=chan_points,json=chanPoints,proto3" json:"chan_points,omitempty"`
//
//Start time is beginning of the range over which the report will be
//generated, expressed as unix epoch offset in seconds.
StartTime uint64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
//
//End time is end of the range over which the report will be
//generated, expressed as unix epoch offset in seconds.
EndTime uint64 `protobuf:"varint,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*RevenueReportRequest) Descriptor ¶
func (*RevenueReportRequest) Descriptor() ([]byte, []int)
func (*RevenueReportRequest) GetChanPoints ¶
func (m *RevenueReportRequest) GetChanPoints() []string
func (*RevenueReportRequest) GetEndTime ¶
func (m *RevenueReportRequest) GetEndTime() uint64
func (*RevenueReportRequest) GetStartTime ¶
func (m *RevenueReportRequest) GetStartTime() uint64
func (*RevenueReportRequest) ProtoMessage ¶
func (*RevenueReportRequest) ProtoMessage()
func (*RevenueReportRequest) Reset ¶
func (m *RevenueReportRequest) Reset()
func (*RevenueReportRequest) String ¶
func (m *RevenueReportRequest) String() string
func (*RevenueReportRequest) XXX_DiscardUnknown ¶
func (m *RevenueReportRequest) XXX_DiscardUnknown()
func (*RevenueReportRequest) XXX_Marshal ¶
func (m *RevenueReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RevenueReportRequest) XXX_Merge ¶
func (m *RevenueReportRequest) XXX_Merge(src proto.Message)
func (*RevenueReportRequest) XXX_Size ¶
func (m *RevenueReportRequest) XXX_Size() int
func (*RevenueReportRequest) XXX_Unmarshal ¶
func (m *RevenueReportRequest) XXX_Unmarshal(b []byte) error
type RevenueReportResponse ¶
type RevenueReportResponse struct {
//
//Reports is a set of pairwise revenue report generated for the channel(s)
//over the period specified.
Reports []*RevenueReport `protobuf:"bytes,1,rep,name=reports,proto3" json:"reports,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*RevenueReportResponse) Descriptor ¶
func (*RevenueReportResponse) Descriptor() ([]byte, []int)
func (*RevenueReportResponse) GetReports ¶
func (m *RevenueReportResponse) GetReports() []*RevenueReport
func (*RevenueReportResponse) ProtoMessage ¶
func (*RevenueReportResponse) ProtoMessage()
func (*RevenueReportResponse) Reset ¶
func (m *RevenueReportResponse) Reset()
func (*RevenueReportResponse) String ¶
func (m *RevenueReportResponse) String() string
func (*RevenueReportResponse) XXX_DiscardUnknown ¶
func (m *RevenueReportResponse) XXX_DiscardUnknown()
func (*RevenueReportResponse) XXX_Marshal ¶
func (m *RevenueReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RevenueReportResponse) XXX_Merge ¶
func (m *RevenueReportResponse) XXX_Merge(src proto.Message)
func (*RevenueReportResponse) XXX_Size ¶
func (m *RevenueReportResponse) XXX_Size() int
func (*RevenueReportResponse) XXX_Unmarshal ¶
func (m *RevenueReportResponse) XXX_Unmarshal(b []byte) error
type ThresholdRecommendationsRequest ¶
type ThresholdRecommendationsRequest struct {
//
//The parameters that are common to all close recommendations.
RecRequest *CloseRecommendationRequest `protobuf:"bytes,1,opt,name=rec_request,json=recRequest,proto3" json:"rec_request,omitempty"`
//
//The threshold that recommendations will be calculated based on.
//For uptime: ratio of uptime to observed lifetime beneath which channels
//will be recommended for closure.
//
//For revenue: revenue per block that capital has been committed to the
//channel beneath which channels will be recommended for closure. This
//value is provided per block so that channels that have been open for
//different periods of time can be compared.
//
//For incoming volume: The incoming volume per block that capital has
//been committed to the channel beneath which channels will be recommended
//for closure. This value is provided per block so that channels that have
//been open for different periods of time can be compared.
//
//For outgoing volume: The outgoing volume per block that capital has been
//committed to the channel beneath which channels will be recommended for
//closure. This value is provided per block so that channels that have been
//open for different periods of time can be compared.
//
//For total volume: The total volume per block that capital has been
//committed to the channel beneath which channels will be recommended for
//closure. This value is provided per block so that channels that have been
//open for different periods of time can be compared.
ThresholdValue float32 `protobuf:"fixed32,2,opt,name=threshold_value,json=thresholdValue,proto3" json:"threshold_value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ThresholdRecommendationsRequest) Descriptor ¶
func (*ThresholdRecommendationsRequest) Descriptor() ([]byte, []int)
func (*ThresholdRecommendationsRequest) GetRecRequest ¶
func (m *ThresholdRecommendationsRequest) GetRecRequest() *CloseRecommendationRequest
func (*ThresholdRecommendationsRequest) GetThresholdValue ¶
func (m *ThresholdRecommendationsRequest) GetThresholdValue() float32
func (*ThresholdRecommendationsRequest) ProtoMessage ¶
func (*ThresholdRecommendationsRequest) ProtoMessage()
func (*ThresholdRecommendationsRequest) Reset ¶
func (m *ThresholdRecommendationsRequest) Reset()
func (*ThresholdRecommendationsRequest) String ¶
func (m *ThresholdRecommendationsRequest) String() string
func (*ThresholdRecommendationsRequest) XXX_DiscardUnknown ¶
func (m *ThresholdRecommendationsRequest) XXX_DiscardUnknown()
func (*ThresholdRecommendationsRequest) XXX_Marshal ¶
func (m *ThresholdRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ThresholdRecommendationsRequest) XXX_Merge ¶
func (m *ThresholdRecommendationsRequest) XXX_Merge(src proto.Message)
func (*ThresholdRecommendationsRequest) XXX_Size ¶
func (m *ThresholdRecommendationsRequest) XXX_Size() int
func (*ThresholdRecommendationsRequest) XXX_Unmarshal ¶
func (m *ThresholdRecommendationsRequest) XXX_Unmarshal(b []byte) error