comm

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2017-2018 OneLedger

Cover over the Tendermint client handling.

TODO: Make this generic to handle HTTP and local clients

TODO: We want configurable, switchable conversions for the different pathways

  • transactions sent from Tendermint (is this a mix between wire and JSON?)
  • data stored in LevelDB
  • queries coming in from http

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Broadcast

func Broadcast(packet []byte) *ctypes.ResultBroadcastTx

An async Broadcast to the chain

func BroadcastCommit

func BroadcastCommit(packet []byte) *ctypes.ResultBroadcastTxCommit

A sync'ed broadcast to the chain that waits for the commit to happen

func Deserialize

func Deserialize(input []byte, output interface{}) (msg interface{}, err error)

Given something in wire format, stick it back into the original golang types If output is a struct, make sure it is a pointer to a struct

func GetClient

func GetClient() (client *rpcclient.HTTP)

HTTP interface, allows Broadcast? TODO: Want to switch client type, based on config or cli args.

func NewAppClient

func NewAppClient() client.Client

Generic Client interface, allows SetOption

func Query

func Query(path string, packet []byte) (res *ctypes.ResultABCIQuery)

Send a very specific query

func Search(query string, prove bool) (res []*ctypes.ResultTx)

func Serialize

func Serialize(input interface{}) (msg []byte, err error)

Given any type of input (except Maps), convert it into wire format

func SetOption

func SetOption(key string, value string)

Set an option in the ABCi app directly

Types

type Message

type Message = []byte

Jump to

Keyboard shortcuts

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