Documentation
¶
Overview ¶
Package tmstore implements a store that saves all the segments in a tendermint app
Index ¶
- Constants
- type Config
- type Info
- type TMClient
- func (c *TMClient) ABCIInfo() (*ctypes.ResultABCIInfo, error)
- func (c *TMClient) ABCIQuery(query []byte) (*ctypes.ResultABCIQuery, error)
- func (c *TMClient) BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *TMClient) BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error)
- func (c *TMClient) BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *TMClient) Status() (*ctypes.ResultStatus, error)
- type TMStore
- func (t *TMStore) AddDidSaveChannel(saveChan chan *cs.Segment)
- func (t *TMStore) DeleteSegment(linkHash *types.Bytes32) (segment *cs.Segment, err error)
- func (t *TMStore) FindSegments(filter *store.Filter) (segmentSlice cs.SegmentSlice, err error)
- func (t *TMStore) GetInfo() (interface{}, error)
- func (t *TMStore) GetMapIDs(pagination *store.Pagination) (ids []string, err error)
- func (t *TMStore) GetSegment(linkHash *types.Bytes32) (segment *cs.Segment, err error)
- func (t *TMStore) SaveSegment(segment *cs.Segment) error
Constants ¶
const ( // Name is the name set in the store's information. Name = "tm" // Description is the description set in the store's information. Description = "Stratumn TM Store" // DefaultEndpoint is the default Tendermint endpoint DefaultEndpoint = "tcp://127.0.0.1:46657" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// A version string that will be set in the store's information.
Version string
// A git commit hash that will be set in the store's information.
Commit string
// Endoint used to communicate with Tendermint core
Endpoint string
}
Config contains configuration options for the store.
type Info ¶
type Info struct {
Name string `json:"name"`
Description string `json:"description"`
TMAppInfo interface{} `json:"tmAppDescription"`
Version string `json:"version"`
Commit string `json:"commit"`
}
Info is the info returned by GetInfo.
type TMClient ¶
type TMClient struct {
// contains filtered or unexported fields
}
TMClient is the type that implements the Tendermint RPC Client interface
func NewTMClient ¶
NewTMClient creates a new HTTPClient that communicates with Tendermint
func (*TMClient) ABCIInfo ¶
func (c *TMClient) ABCIInfo() (*ctypes.ResultABCIInfo, error)
ABCIInfo returns info about the Tendermint App
func (*TMClient) ABCIQuery ¶
func (c *TMClient) ABCIQuery(query []byte) (*ctypes.ResultABCIQuery, error)
ABCIQuery sends a query to the Tendermint App
func (*TMClient) BroadcastTxAsync ¶
BroadcastTxAsync broadcasts a Tx to the Tendermint Core
func (*TMClient) BroadcastTxCommit ¶
BroadcastTxCommit broadcasts a Tx to the Tendermint Core
func (*TMClient) BroadcastTxSync ¶
BroadcastTxSync broadcasts a Tx synchronously to the Tendermint Core
type TMStore ¶
type TMStore struct {
// contains filtered or unexported fields
}
TMStore is the type that implements github.com/stratumn/go/store.Adapter.
func (*TMStore) AddDidSaveChannel ¶
AddDidSaveChannel implements github.com/stratumn/go/fossilizer.Store.AddDidSaveChannel.
func (*TMStore) DeleteSegment ¶
DeleteSegment implements github.com/stratumn/go/store.Adapter.DeleteSegment.
func (*TMStore) FindSegments ¶
FindSegments implements github.com/stratumn/go/store.Adapter.FindSegments.
func (*TMStore) GetMapIDs ¶
func (t *TMStore) GetMapIDs(pagination *store.Pagination) (ids []string, err error)
GetMapIDs implements github.com/stratumn/go/store.Adapter.GetMapIDs.
func (*TMStore) GetSegment ¶
GetSegment implements github.com/stratumn/go/store.Adapter.GetSegment.