watchtowerrpc

package
v0.9.1-beta.rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Subsystem = "WRPC"

Subsystem defines the logging code for this subsystem.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by by default until UseLogger is called.

func RegisterWatchtowerServer

func RegisterWatchtowerServer(s *grpc.Server, srv WatchtowerServer)

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.

Types

type Config

type Config struct{}

Config is empty for non-watchtowerrpc builds.

type GetInfoRequest

type GetInfoRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetInfoRequest) Descriptor

func (*GetInfoRequest) Descriptor() ([]byte, []int)

func (*GetInfoRequest) ProtoMessage

func (*GetInfoRequest) ProtoMessage()

func (*GetInfoRequest) Reset

func (m *GetInfoRequest) Reset()

func (*GetInfoRequest) String

func (m *GetInfoRequest) String() string

func (*GetInfoRequest) XXX_DiscardUnknown

func (m *GetInfoRequest) XXX_DiscardUnknown()

func (*GetInfoRequest) XXX_Marshal

func (m *GetInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetInfoRequest) XXX_Merge

func (m *GetInfoRequest) XXX_Merge(src proto.Message)

func (*GetInfoRequest) XXX_Size

func (m *GetInfoRequest) XXX_Size() int

func (*GetInfoRequest) XXX_Unmarshal

func (m *GetInfoRequest) XXX_Unmarshal(b []byte) error

type GetInfoResponse

type GetInfoResponse struct {
	/// The public key of the watchtower.
	Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	/// The listening addresses of the watchtower.
	Listeners []string `protobuf:"bytes,2,rep,name=listeners,proto3" json:"listeners,omitempty"`
	/// The URIs of the watchtower.
	Uris                 []string `protobuf:"bytes,3,rep,name=uris,proto3" json:"uris,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetInfoResponse) Descriptor

func (*GetInfoResponse) Descriptor() ([]byte, []int)

func (*GetInfoResponse) GetListeners

func (m *GetInfoResponse) GetListeners() []string

func (*GetInfoResponse) GetPubkey

func (m *GetInfoResponse) GetPubkey() []byte

func (*GetInfoResponse) GetUris

func (m *GetInfoResponse) GetUris() []string

func (*GetInfoResponse) ProtoMessage

func (*GetInfoResponse) ProtoMessage()

func (*GetInfoResponse) Reset

func (m *GetInfoResponse) Reset()

func (*GetInfoResponse) String

func (m *GetInfoResponse) String() string

func (*GetInfoResponse) XXX_DiscardUnknown

func (m *GetInfoResponse) XXX_DiscardUnknown()

func (*GetInfoResponse) XXX_Marshal

func (m *GetInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetInfoResponse) XXX_Merge

func (m *GetInfoResponse) XXX_Merge(src proto.Message)

func (*GetInfoResponse) XXX_Size

func (m *GetInfoResponse) XXX_Size() int

func (*GetInfoResponse) XXX_Unmarshal

func (m *GetInfoResponse) XXX_Unmarshal(b []byte) error

type WatchtowerBackend

type WatchtowerBackend interface {
	// PubKey returns the public key for the watchtower used to
	// authentication and encrypt traffic with clients.
	PubKey() *btcec.PublicKey

	// ListeningAddrs returns the listening addresses where the watchtower
	// server can accept client connections.
	ListeningAddrs() []net.Addr

	// ExternalIPs returns the addresses where the watchtower can be reached
	// by clients externally.
	ExternalIPs() []net.Addr
}

WatchtowerBackend abstracts access to the watchtower information that is served via RPC connections.

type WatchtowerClient

type WatchtowerClient interface {
	//* lncli: tower info
	//GetInfo returns general information concerning the companion watchtower
	//including it's public key and URIs where the server is currently
	//listening for clients.
	GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
}

WatchtowerClient is the client API for Watchtower service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWatchtowerClient

func NewWatchtowerClient(cc *grpc.ClientConn) WatchtowerClient

type WatchtowerServer

type WatchtowerServer interface {
	//* lncli: tower info
	//GetInfo returns general information concerning the companion watchtower
	//including it's public key and URIs where the server is currently
	//listening for clients.
	GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
}

WatchtowerServer is the server API for Watchtower service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL