Documentation ¶
Overview ¶
Package devrpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func DisableLog()
- func RegisterDevHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDevHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DevClient) error
- func RegisterDevHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDevHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DevServer) error
- func RegisterDevJSONCallbacks(...)
- func RegisterDevServer(s grpc.ServiceRegistrar, srv DevServer)
- func UseLogger(logger btclog.Logger)
- type Config
- type DevClient
- type DevServer
- type ImportGraphResponse
- type UnimplementedDevServer
- type UnsafeDevServer
Constants ¶
This section is empty.
Variables ¶
var Dev_ServiceDesc = grpc.ServiceDesc{ ServiceName: "devrpc.Dev", HandlerType: (*DevServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ImportGraph", Handler: _Dev_ImportGraph_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "devrpc/dev.proto", }
Dev_ServiceDesc is the grpc.ServiceDesc for Dev service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_devrpc_dev_proto protoreflect.FileDescriptor
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by by default until UseLogger is called.
func RegisterDevHandler ¶
RegisterDevHandler registers the http handlers for service Dev to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDevHandlerClient ¶
RegisterDevHandlerClient registers the http handlers for service Dev to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DevClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DevClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DevClient" to call the correct interceptors.
func RegisterDevHandlerFromEndpoint ¶
func RegisterDevHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDevHandlerFromEndpoint is same as RegisterDevHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDevHandlerServer ¶
RegisterDevHandlerServer registers the http handlers for service Dev to "mux". UnaryRPC :call DevServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDevHandlerFromEndpoint instead.
func RegisterDevServer ¶
func RegisterDevServer(s grpc.ServiceRegistrar, srv DevServer)
Types ¶
type DevClient ¶
type DevClient interface { // //ImportGraph imports a ChannelGraph into the graph database. Should only be //used for development. ImportGraph(ctx context.Context, in *lnrpc.ChannelGraph, opts ...grpc.CallOption) (*ImportGraphResponse, error) }
DevClient is the client API for Dev service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewDevClient ¶
func NewDevClient(cc grpc.ClientConnInterface) DevClient
type DevServer ¶
type DevServer interface { // //ImportGraph imports a ChannelGraph into the graph database. Should only be //used for development. ImportGraph(context.Context, *lnrpc.ChannelGraph) (*ImportGraphResponse, error) // contains filtered or unexported methods }
DevServer is the server API for Dev service. All implementations must embed UnimplementedDevServer for forward compatibility
type ImportGraphResponse ¶
type ImportGraphResponse struct {
// contains filtered or unexported fields
}
func (*ImportGraphResponse) Descriptor
deprecated
func (*ImportGraphResponse) Descriptor() ([]byte, []int)
Deprecated: Use ImportGraphResponse.ProtoReflect.Descriptor instead.
func (*ImportGraphResponse) ProtoMessage ¶
func (*ImportGraphResponse) ProtoMessage()
func (*ImportGraphResponse) ProtoReflect ¶
func (x *ImportGraphResponse) ProtoReflect() protoreflect.Message
func (*ImportGraphResponse) Reset ¶
func (x *ImportGraphResponse) Reset()
func (*ImportGraphResponse) String ¶
func (x *ImportGraphResponse) String() string
type UnimplementedDevServer ¶
type UnimplementedDevServer struct { }
UnimplementedDevServer must be embedded to have forward compatible implementations.
func (UnimplementedDevServer) ImportGraph ¶
func (UnimplementedDevServer) ImportGraph(context.Context, *lnrpc.ChannelGraph) (*ImportGraphResponse, error)
type UnsafeDevServer ¶
type UnsafeDevServer interface {
// contains filtered or unexported methods
}
UnsafeDevServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DevServer will result in compilation errors.