carthage

package module
v0.0.0-...-83016a8 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerFromContext

func LoggerFromContext(ctx context.Context) *log.Logger

func NewContextWithLogger

func NewContextWithLogger(ctx context.Context, level log.Level) context.Context

Types

type Config

type Config struct {
	LogLevel string

	RPC struct {
		RpcWs  bool
		RpcIpc bool
		RpcUri string
	}

	P2P struct {
		ListenAddr string
	}
}

type NodeService

type NodeService interface {
	Start(ctx context.Context, result chan *RPCResult)
	Close()
	Call(call *RPCCall) error
}

type PeerMessage

type PeerMessage struct {
	Data []byte
}

type PeerService

type PeerService interface {
	Start()
	Close()
}

type RPCCall

type RPCCall struct {
	Method string            `json:"method"`
	Params map[string]string `json:"params"`
}

func (*RPCCall) JsonUnmarshal

func (r *RPCCall) JsonUnmarshal(data []byte) error

func (*RPCCall) Validate

func (c *RPCCall) Validate() (bool, error)

type RPCResult

type RPCResult struct {
	Method string      `json:"method"`
	Result interface{} `json:"result"`
}

func (*RPCResult) JsonMarshal

func (r *RPCResult) JsonMarshal() ([]byte, error)

Directories

Path Synopsis
cmd
carthage-client command
carthaged command

Jump to

Keyboard shortcuts

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