Documentation
¶
Index ¶
Constants ¶
View Source
const ( CBORRPCProtocol protocol.ID = "/cborrpc/v1" CBORRPCZstdProtocol protocol.ID = "/cborrpc/v1zstd" )
View Source
const ( JSONRPCProtocol protocol.ID = "/jsonrpc/v1" JSONRPCZstdProtocol protocol.ID = "/jsonrpc/v1zstd" )
Variables ¶
View Source
var DefaultCBORClientOptions = CBORClientOptions{ Compress: true, }
View Source
var DefaultCBORServiceOptions = CBORServiceOptions{ ServiceName: "ldc:cborrpc", Timeout: 5 * time.Second, HandleLog: value.DefaultLogHandler, }
View Source
var DefaultJSONClientOptions = JSONClientOptions{ Compress: true, }
View Source
var DefaultJSONServiceOptions = JSONServiceOptions{ ServiceName: "ldc:jsonrpc", Timeout: 5 * time.Second, HandleLog: value.DefaultLogHandler, }
Functions ¶
This section is empty.
Types ¶
type CBORClient ¶
type CBORClient struct {
// contains filtered or unexported fields
}
func NewCBORClient ¶
func NewCBORClient(host host.Host, endpoint peer.ID, opts *CBORClientOptions) *CBORClient
type CBORClientOptions ¶ added in v0.1.0
type CBORClientOptions struct {
Compress bool
}
type CBORService ¶
type CBORService struct {
// contains filtered or unexported fields
}
func NewCBORService ¶
func NewCBORService( ctx context.Context, host host.Host, h cborrpc.Handler, opts *CBORServiceOptions) *CBORService
type CBORServiceOptions ¶ added in v0.1.0
type JSONClient ¶ added in v0.1.0
type JSONClient struct {
// contains filtered or unexported fields
}
func NewJSONClient ¶ added in v0.1.0
func NewJSONClient(host host.Host, endpoint peer.ID, opts *JSONClientOptions) *JSONClient
type JSONClientOptions ¶ added in v0.1.0
type JSONClientOptions struct {
Compress bool
}
type JSONService ¶ added in v0.1.0
type JSONService struct {
// contains filtered or unexported fields
}
func NewJSONService ¶ added in v0.1.0
func NewJSONService( ctx context.Context, host host.Host, h jsonrpc.Handler, opts *JSONServiceOptions) *JSONService
Click to show internal directories.
Click to hide internal directories.