Documentation ¶
Index ¶
- type NetworkInfo
- type PeerInfo
- type Server
- func (s *Server) Announce(ctx context.Context, chainID string, peer *PeerInfo) error
- func (s *Server) Join(ctx context.Context, chainID string) (*NetworkInfo, error)
- func (s *Server) Peers(ctx context.Context, chainID string) (<-chan *PeerInfo, error)
- func (s *Server) Publish(ctx context.Context, manifestPath, genesisPath, imagePath string) (string, error)
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkInfo ¶
type NetworkInfo struct { Manifest []byte Genesis []byte Image io.ReadCloser }
NetworkInfo represents a network.
func (*NetworkInfo) Project ¶
func (n *NetworkInfo) Project() (*project.Project, error)
Project returns a project object from the network info.
func (*NetworkInfo) WriteManifest ¶
func (n *NetworkInfo) WriteManifest(dst string) error
WriteManifest writes the manifest file to dst
type PeerInfo ¶
type PeerInfo struct { NodeID string `json:"node_id"` IP []string `json:"ips"` TendermintP2PPort int `json:"tendermint_p2p_port"` }
PeerInfo contains information about one peer.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the discovery server
func (*Server) Publish ¶
func (s *Server) Publish(ctx context.Context, manifestPath, genesisPath, imagePath string) (string, error)
Publish publishes chain information. Returns the chain ID.
Click to show internal directories.
Click to hide internal directories.