rpc

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: LGPL-2.1 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(projectId, projectSecret string) *http.Client

NewClient creates an http.Client that automatically perform basic auth on each request.

Types

type Flag

type Flag string

type HttpService

type HttpService struct {
	Ctx *context.Context
	Cfg *configs.MainConfiguration
	// contains filtered or unexported fields
}

func NewHttpService

func NewHttpService(mainCtx *context.Context) *HttpService

func (*HttpService) Start

func (p *HttpService) Start(rpcPort string) error

type IpfsData

type IpfsData struct {
	Message string
	Subject string
}

type JsonRpc

type JsonRpc struct {
	JsonRpcVersion string            `json:"jsonrpc"`
	Id             int               `json:"id"`
	Method         string            `json:"method"`
	Params         []json.RawMessage `json:"params"`
}

type RpcResponse

type RpcResponse struct {
	Status string      `json:"status"`
	Data   interface{} `json:"data"`
}

type RpcService

type RpcService struct {
	Ctx *context.Context
	Cfg *configs.MainConfiguration
}

func NewRpcService

func NewRpcService(mainCtx *context.Context) *RpcService

func (*RpcService) SendMessage

func (p *RpcService) SendMessage(param []byte, reply *RpcResponse) error

func (*RpcService) Subscription

func (p *RpcService) Subscription(params []byte, reply *RpcResponse) error

Jump to

Keyboard shortcuts

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