rpc

package
v0.0.0-...-6721946 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: LGPL-2.1 Imports: 11 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.

func RpcClient

func RpcClient()

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() 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