Documentation ¶
Index ¶
- Variables
- func RegisterTorqrpcServer(s *grpc.Server, srv TorqrpcServer)
- type AggregatedForwards
- func (*AggregatedForwards) Descriptor() ([]byte, []int)deprecated
- func (x *AggregatedForwards) GetAmountIn() uint64
- func (x *AggregatedForwards) GetAmountOut() uint64
- func (x *AggregatedForwards) GetAmountTotal() uint64
- func (x *AggregatedForwards) GetCapacity() uint64
- func (x *AggregatedForwards) GetChannels() []*ChanInfo
- func (x *AggregatedForwards) GetCountIn() uint64
- func (x *AggregatedForwards) GetCountOut() uint64
- func (x *AggregatedForwards) GetCountTotal() uint64
- func (x *AggregatedForwards) GetGroupId() string
- func (x *AggregatedForwards) GetGroupName() string
- func (x *AggregatedForwards) GetGroupType() GroupType
- func (x *AggregatedForwards) GetRevenueIn() uint64
- func (x *AggregatedForwards) GetRevenueOut() uint64
- func (x *AggregatedForwards) GetRevenueTotal() uint64
- func (x *AggregatedForwards) GetTurnover() float32
- func (*AggregatedForwards) ProtoMessage()
- func (x *AggregatedForwards) ProtoReflect() protoreflect.Message
- func (x *AggregatedForwards) Reset()
- func (x *AggregatedForwards) String() string
- type AggregatedForwardsRequest
- func (*AggregatedForwardsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AggregatedForwardsRequest) GetChannelIds() *ChannelIDs
- func (x *AggregatedForwardsRequest) GetFromTs() int64
- func (m *AggregatedForwardsRequest) GetIds() isAggregatedForwardsRequest_Ids
- func (x *AggregatedForwardsRequest) GetPeerIds() *PeerIDs
- func (x *AggregatedForwardsRequest) GetTagIds() *TagIDs
- func (x *AggregatedForwardsRequest) GetToTs() int64
- func (*AggregatedForwardsRequest) ProtoMessage()
- func (x *AggregatedForwardsRequest) ProtoReflect() protoreflect.Message
- func (x *AggregatedForwardsRequest) Reset()
- func (x *AggregatedForwardsRequest) String() string
- type AggregatedForwardsRequest_ChannelIds
- type AggregatedForwardsRequest_PeerIds
- type AggregatedForwardsRequest_TagIds
- type AggregatedForwardsResponse
- func (*AggregatedForwardsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AggregatedForwardsResponse) GetAggregatedForwards() []*AggregatedForwards
- func (x *AggregatedForwardsResponse) GetFromTs() int64
- func (x *AggregatedForwardsResponse) GetGroupType() GroupType
- func (x *AggregatedForwardsResponse) GetToTs() int64
- func (*AggregatedForwardsResponse) ProtoMessage()
- func (x *AggregatedForwardsResponse) ProtoReflect() protoreflect.Message
- func (x *AggregatedForwardsResponse) Reset()
- func (x *AggregatedForwardsResponse) String() string
- type ChanInfo
- func (*ChanInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ChanInfo) GetAlias() string
- func (x *ChanInfo) GetChanId() uint64
- func (x *ChanInfo) GetClosed() bool
- func (x *ChanInfo) GetPubKey() string
- func (x *ChanInfo) GetTags() []string
- func (*ChanInfo) ProtoMessage()
- func (x *ChanInfo) ProtoReflect() protoreflect.Message
- func (x *ChanInfo) Reset()
- func (x *ChanInfo) String() string
- type ChannelIDs
- type GroupType
- type PeerIDs
- type TagIDs
- type TorqrpcClient
- type TorqrpcServer
- type UnimplementedTorqrpcServer
Constants ¶
This section is empty.
Variables ¶
var ( GroupType_name = map[int32]string{ 0: "CHANNEL", 1: "PEER", 2: "TAG", } GroupType_value = map[string]int32{ "CHANNEL": 0, "PEER": 1, "TAG": 2, } )
Enum value maps for GroupType.
var File_torq_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTorqrpcServer ¶
func RegisterTorqrpcServer(s *grpc.Server, srv TorqrpcServer)
Types ¶
type AggregatedForwards ¶
type AggregatedForwards struct { // A list of the channel included in the aggregated result. Channels []*ChanInfo `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"` // This represents the type of aggregation // 0 = CHANNEL, means forwards are aggregated per channel // 1 = PEER, means forwards are aggregated per peer (remote public key) // 1 = TAG, means forwards are aggregated per tag, tags are a user defined group of channels. GroupType GroupType `protobuf:"varint,2,opt,name=group_type,json=groupType,proto3,enum=torqrpc.GroupType" json:"group_type,omitempty"` // The group_id depends on the granularity requested. // * Channel ID for individual channels // * Remote peers public key when it's grouped per peer // * Tag id when it's grouped by tag. GroupId string `protobuf:"bytes,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // The group_name depends on the granularity requested. // * Individual channels use the format: <Alias> (<Channel ID>) // * Peer grouped use the format: <Alias> // * Tag groups use the format: <Tag Name> GroupName string `protobuf:"bytes,5,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"` // The utbound amount in sats (Satoshis) AmountOut uint64 `protobuf:"varint,6,opt,name=amount_out,json=amountOut,proto3" json:"amount_out,omitempty"` // The inbound amount in sats (Satoshis) AmountIn uint64 `protobuf:"varint,7,opt,name=amount_in,json=amountIn,proto3" json:"amount_in,omitempty"` // The total amount forwarded both inbound and outbound AmountTotal uint64 `protobuf:"varint,15,opt,name=amount_total,json=amountTotal,proto3" json:"amount_total,omitempty"` // The outbound revenue in sats. This is what the channel has directly produced. RevenueOut uint64 `protobuf:"varint,8,opt,name=revenue_out,json=revenueOut,proto3" json:"revenue_out,omitempty"` // The inbound revenue in sats. This is what the channel has indirectly produced. // This revenue are not really earned by this channel/peer/group, but represents // the channel/peer/group contribution to revenue earned by other channels. RevenueIn uint64 `protobuf:"varint,9,opt,name=revenue_in,json=revenueIn,proto3" json:"revenue_in,omitempty"` // Total revenue RevenueTotal uint64 `protobuf:"varint,14,opt,name=revenue_total,json=revenueTotal,proto3" json:"revenue_total,omitempty"` // Number of outbound forwards. CountOut uint64 `protobuf:"varint,10,opt,name=count_out,json=countOut,proto3" json:"count_out,omitempty"` // Number of inbound forwards. CountIn uint64 `protobuf:"varint,11,opt,name=count_in,json=countIn,proto3" json:"count_in,omitempty"` // Number of inbound forwards. CountTotal uint64 `protobuf:"varint,12,opt,name=count_total,json=countTotal,proto3" json:"count_total,omitempty"` // The total capacity of this channel Capacity uint64 `protobuf:"varint,13,opt,name=capacity,proto3" json:"capacity,omitempty"` // Turnover = capacity/amount_total. It is a measure of how many times // the capital is used in the given time interval. Turnover float32 `protobuf:"fixed32,16,opt,name=turnover,proto3" json:"turnover,omitempty"` // contains filtered or unexported fields }
AggregatedForwards represents a channels, peers or tags aggregated forwarding stats.
func (*AggregatedForwards) Descriptor
deprecated
func (*AggregatedForwards) Descriptor() ([]byte, []int)
Deprecated: Use AggregatedForwards.ProtoReflect.Descriptor instead.
func (*AggregatedForwards) GetAmountIn ¶
func (x *AggregatedForwards) GetAmountIn() uint64
func (*AggregatedForwards) GetAmountOut ¶
func (x *AggregatedForwards) GetAmountOut() uint64
func (*AggregatedForwards) GetAmountTotal ¶
func (x *AggregatedForwards) GetAmountTotal() uint64
func (*AggregatedForwards) GetCapacity ¶
func (x *AggregatedForwards) GetCapacity() uint64
func (*AggregatedForwards) GetChannels ¶
func (x *AggregatedForwards) GetChannels() []*ChanInfo
func (*AggregatedForwards) GetCountIn ¶
func (x *AggregatedForwards) GetCountIn() uint64
func (*AggregatedForwards) GetCountOut ¶
func (x *AggregatedForwards) GetCountOut() uint64
func (*AggregatedForwards) GetCountTotal ¶
func (x *AggregatedForwards) GetCountTotal() uint64
func (*AggregatedForwards) GetGroupId ¶
func (x *AggregatedForwards) GetGroupId() string
func (*AggregatedForwards) GetGroupName ¶
func (x *AggregatedForwards) GetGroupName() string
func (*AggregatedForwards) GetGroupType ¶
func (x *AggregatedForwards) GetGroupType() GroupType
func (*AggregatedForwards) GetRevenueIn ¶
func (x *AggregatedForwards) GetRevenueIn() uint64
func (*AggregatedForwards) GetRevenueOut ¶
func (x *AggregatedForwards) GetRevenueOut() uint64
func (*AggregatedForwards) GetRevenueTotal ¶
func (x *AggregatedForwards) GetRevenueTotal() uint64
func (*AggregatedForwards) GetTurnover ¶
func (x *AggregatedForwards) GetTurnover() float32
func (*AggregatedForwards) ProtoMessage ¶
func (*AggregatedForwards) ProtoMessage()
func (*AggregatedForwards) ProtoReflect ¶
func (x *AggregatedForwards) ProtoReflect() protoreflect.Message
func (*AggregatedForwards) Reset ¶
func (x *AggregatedForwards) Reset()
func (*AggregatedForwards) String ¶
func (x *AggregatedForwards) String() string
type AggregatedForwardsRequest ¶
type AggregatedForwardsRequest struct { // From what date/time (unix timestamp) FromTs int64 `protobuf:"varint,1,opt,name=from_ts,json=fromTs,proto3" json:"from_ts,omitempty"` // To what date/time (unix timestamp) ToTs int64 `protobuf:"varint,2,opt,name=to_ts,json=toTs,proto3" json:"to_ts,omitempty"` // Types that are assignable to Ids: // *AggregatedForwardsRequest_ChannelIds // *AggregatedForwardsRequest_PeerIds // *AggregatedForwardsRequest_TagIds Ids isAggregatedForwardsRequest_Ids `protobuf_oneof:"ids"` // contains filtered or unexported fields }
------------------------------------------------------------------ Aggregated forwards ------------------------------------------------------------------
func (*AggregatedForwardsRequest) Descriptor
deprecated
func (*AggregatedForwardsRequest) Descriptor() ([]byte, []int)
Deprecated: Use AggregatedForwardsRequest.ProtoReflect.Descriptor instead.
func (*AggregatedForwardsRequest) GetChannelIds ¶
func (x *AggregatedForwardsRequest) GetChannelIds() *ChannelIDs
func (*AggregatedForwardsRequest) GetFromTs ¶
func (x *AggregatedForwardsRequest) GetFromTs() int64
func (*AggregatedForwardsRequest) GetIds ¶
func (m *AggregatedForwardsRequest) GetIds() isAggregatedForwardsRequest_Ids
func (*AggregatedForwardsRequest) GetPeerIds ¶
func (x *AggregatedForwardsRequest) GetPeerIds() *PeerIDs
func (*AggregatedForwardsRequest) GetTagIds ¶
func (x *AggregatedForwardsRequest) GetTagIds() *TagIDs
func (*AggregatedForwardsRequest) GetToTs ¶
func (x *AggregatedForwardsRequest) GetToTs() int64
func (*AggregatedForwardsRequest) ProtoMessage ¶
func (*AggregatedForwardsRequest) ProtoMessage()
func (*AggregatedForwardsRequest) ProtoReflect ¶
func (x *AggregatedForwardsRequest) ProtoReflect() protoreflect.Message
func (*AggregatedForwardsRequest) Reset ¶
func (x *AggregatedForwardsRequest) Reset()
func (*AggregatedForwardsRequest) String ¶
func (x *AggregatedForwardsRequest) String() string
type AggregatedForwardsRequest_ChannelIds ¶
type AggregatedForwardsRequest_ChannelIds struct {
ChannelIds *ChannelIDs `protobuf:"bytes,3,opt,name=channel_ids,json=channelIds,proto3,oneof"`
}
type AggregatedForwardsRequest_PeerIds ¶
type AggregatedForwardsRequest_PeerIds struct {
PeerIds *PeerIDs `protobuf:"bytes,4,opt,name=peer_ids,json=peerIds,proto3,oneof"`
}
type AggregatedForwardsRequest_TagIds ¶
type AggregatedForwardsRequest_TagIds struct {
TagIds *TagIDs `protobuf:"bytes,5,opt,name=tag_ids,json=tagIds,proto3,oneof"`
}
type AggregatedForwardsResponse ¶
type AggregatedForwardsResponse struct { // From what date/time (unix timestamp) FromTs int64 `protobuf:"varint,1,opt,name=from_ts,json=fromTs,proto3" json:"from_ts,omitempty"` // To what date/time (unix timestamp) ToTs int64 `protobuf:"varint,2,opt,name=to_ts,json=toTs,proto3" json:"to_ts,omitempty"` // This represents the type of aggregation // 0 = CHANNEL, means forwards are aggregated per channel // 1 = PEER, means forwards are aggregated per peer (remote public key) // 1 = TAG, means forwards are aggregated per tag, tags are a user defined group of channels. GroupType GroupType `protobuf:"varint,3,opt,name=group_type,json=groupType,proto3,enum=torqrpc.GroupType" json:"group_type,omitempty"` // a list of aggregated forwarding stats AggregatedForwards []*AggregatedForwards `protobuf:"bytes,4,rep,name=aggregated_forwards,json=aggregatedForwards,proto3" json:"aggregated_forwards,omitempty"` // contains filtered or unexported fields }
func (*AggregatedForwardsResponse) Descriptor
deprecated
func (*AggregatedForwardsResponse) Descriptor() ([]byte, []int)
Deprecated: Use AggregatedForwardsResponse.ProtoReflect.Descriptor instead.
func (*AggregatedForwardsResponse) GetAggregatedForwards ¶
func (x *AggregatedForwardsResponse) GetAggregatedForwards() []*AggregatedForwards
func (*AggregatedForwardsResponse) GetFromTs ¶
func (x *AggregatedForwardsResponse) GetFromTs() int64
func (*AggregatedForwardsResponse) GetGroupType ¶
func (x *AggregatedForwardsResponse) GetGroupType() GroupType
func (*AggregatedForwardsResponse) GetToTs ¶
func (x *AggregatedForwardsResponse) GetToTs() int64
func (*AggregatedForwardsResponse) ProtoMessage ¶
func (*AggregatedForwardsResponse) ProtoMessage()
func (*AggregatedForwardsResponse) ProtoReflect ¶
func (x *AggregatedForwardsResponse) ProtoReflect() protoreflect.Message
func (*AggregatedForwardsResponse) Reset ¶
func (x *AggregatedForwardsResponse) Reset()
func (*AggregatedForwardsResponse) String ¶
func (x *AggregatedForwardsResponse) String() string
type ChanInfo ¶
type ChanInfo struct { // The channel ID ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"` // Alias of remote peer Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` // The remote public key PubKey string `protobuf:"bytes,3,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` // True if the channel is closed Closed bool `protobuf:"varint,5,opt,name=closed,proto3" json:"closed,omitempty"` // A list of tags associated with this channel Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` // contains filtered or unexported fields }
func (*ChanInfo) Descriptor
deprecated
func (*ChanInfo) ProtoMessage ¶
func (*ChanInfo) ProtoMessage()
func (*ChanInfo) ProtoReflect ¶
func (x *ChanInfo) ProtoReflect() protoreflect.Message
type ChannelIDs ¶
type ChannelIDs struct { // A list of channel IDs ChanIds []uint64 `protobuf:"varint,1,rep,packed,name=chan_ids,json=chanIds,proto3" json:"chan_ids,omitempty"` // contains filtered or unexported fields }
func (*ChannelIDs) Descriptor
deprecated
func (*ChannelIDs) Descriptor() ([]byte, []int)
Deprecated: Use ChannelIDs.ProtoReflect.Descriptor instead.
func (*ChannelIDs) GetChanIds ¶
func (x *ChannelIDs) GetChanIds() []uint64
func (*ChannelIDs) ProtoMessage ¶
func (*ChannelIDs) ProtoMessage()
func (*ChannelIDs) ProtoReflect ¶
func (x *ChannelIDs) ProtoReflect() protoreflect.Message
func (*ChannelIDs) Reset ¶
func (x *ChannelIDs) Reset()
func (*ChannelIDs) String ¶
func (x *ChannelIDs) String() string
type GroupType ¶
type GroupType int32
func (GroupType) Descriptor ¶
func (GroupType) Descriptor() protoreflect.EnumDescriptor
func (GroupType) EnumDescriptor
deprecated
func (GroupType) Number ¶
func (x GroupType) Number() protoreflect.EnumNumber
func (GroupType) Type ¶
func (GroupType) Type() protoreflect.EnumType
type PeerIDs ¶
type PeerIDs struct { // A list of public kees belonging to peers you have channels with PubKeys []string `protobuf:"bytes,1,rep,name=pub_keys,json=pubKeys,proto3" json:"pub_keys,omitempty"` // contains filtered or unexported fields }
func (*PeerIDs) Descriptor
deprecated
func (*PeerIDs) GetPubKeys ¶
func (*PeerIDs) ProtoMessage ¶
func (*PeerIDs) ProtoMessage()
func (*PeerIDs) ProtoReflect ¶
func (x *PeerIDs) ProtoReflect() protoreflect.Message
type TagIDs ¶
type TagIDs struct { // A list of tag ids TagIds []string `protobuf:"bytes,1,rep,name=tag_ids,json=tagIds,proto3" json:"tag_ids,omitempty"` // contains filtered or unexported fields }
func (*TagIDs) Descriptor
deprecated
func (*TagIDs) ProtoMessage ¶
func (*TagIDs) ProtoMessage()
func (*TagIDs) ProtoReflect ¶
func (x *TagIDs) ProtoReflect() protoreflect.Message
type TorqrpcClient ¶
type TorqrpcClient interface {
GetAggrigatedForwards(ctx context.Context, in *AggregatedForwardsRequest, opts ...grpc.CallOption) (*AggregatedForwardsResponse, error)
}
TorqrpcClient is the client API for Torqrpc service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTorqrpcClient ¶
func NewTorqrpcClient(cc grpc.ClientConnInterface) TorqrpcClient
type TorqrpcServer ¶
type TorqrpcServer interface {
GetAggrigatedForwards(context.Context, *AggregatedForwardsRequest) (*AggregatedForwardsResponse, error)
}
TorqrpcServer is the server API for Torqrpc service.
type UnimplementedTorqrpcServer ¶
type UnimplementedTorqrpcServer struct { }
UnimplementedTorqrpcServer can be embedded to have forward compatible implementations.
func (*UnimplementedTorqrpcServer) GetAggrigatedForwards ¶
func (*UnimplementedTorqrpcServer) GetAggrigatedForwards(context.Context, *AggregatedForwardsRequest) (*AggregatedForwardsResponse, error)