ipcs

package
v0.0.0-...-ea0e61c Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(log logging.Logger, chainManager chains.Manager, httpServer *server.Server, ipcs *ipcs.ChainIPCs) (*common.HTTPHandler, error)

NewService returns a new IPCs API service

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(uri string, requestTimeout time.Duration) *Client

NewClient returns a Client for interacting with the IPCS endpoint

func (*Client) GetPublishedBlockchains

func (c *Client) GetPublishedBlockchains() ([]ids.ID, error)

GetPublishedBlockchains requests the node to get blockchains being published

func (*Client) PublishBlockchain

func (c *Client) PublishBlockchain(blockchainID string) (*PublishBlockchainReply, error)

PublishBlockchain requests the node to begin publishing consensus and decision events

func (*Client) UnpublishBlockchain

func (c *Client) UnpublishBlockchain(blockchainID string) (bool, error)

UnpublishBlockchain requests the node to stop publishing consensus and decision events

type GetPublishedBlockchainsReply

type GetPublishedBlockchainsReply struct {
	Chains []ids.ID `json:"chains"`
}

GetPublishedBlockchainsReply is the result from calling GetPublishedBlockchains

type IPCServer

type IPCServer struct {
	// contains filtered or unexported fields
}

IPCServer maintains the IPCs

func (*IPCServer) GetPublishedBlockchains

func (ipc *IPCServer) GetPublishedBlockchains(r *http.Request, args *struct{}, reply *GetPublishedBlockchainsReply) error

GetPublishedBlockchains returns blockchains being published

func (*IPCServer) PublishBlockchain

func (ipc *IPCServer) PublishBlockchain(r *http.Request, args *PublishBlockchainArgs, reply *PublishBlockchainReply) error

PublishBlockchain publishes the finalized accepted transactions from the blockchainID over the IPC

func (*IPCServer) UnpublishBlockchain

func (ipc *IPCServer) UnpublishBlockchain(r *http.Request, args *UnpublishBlockchainArgs, reply *api.SuccessResponse) error

UnpublishBlockchain closes publishing of a blockchainID

type PublishBlockchainArgs

type PublishBlockchainArgs struct {
	BlockchainID string `json:"blockchainID"`
}

PublishBlockchainArgs are the arguments for calling PublishBlockchain

type PublishBlockchainReply

type PublishBlockchainReply struct {
	ConsensusURL string `json:"consensusURL"`
	DecisionsURL string `json:"decisionsURL"`
}

PublishBlockchainReply are the results from calling PublishBlockchain

type UnpublishBlockchainArgs

type UnpublishBlockchainArgs struct {
	BlockchainID string `json:"blockchainID"`
}

UnpublishBlockchainArgs are the arguments for calling UnpublishBlockchain

Jump to

Keyboard shortcuts

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