httputil

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 11, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReceiveGossip

ReceiveGossip receives http gossip message

func ReceiveSolicitation

func ReceiveSolicitation(r *http.Request) (*buffer.DigestBuffer, string, string, *round.GossipRound, error)

ReceiveSolicitation receives http solicitation message

func ReceiveSynchronization

func ReceiveSynchronization(r *http.Request) (*buffer.MessageBuffer, string, string, error)

ReceiveSynchronization receives http solicitation message

func SendGossip

func SendGossip(gossipMsg HTTPGossip, tAddr, tPort string) error

SendGossip send http gossip message

func SendSolicitation

func SendSolicitation(solicitation HTTPSolicitation, tAddr, tPort string) error

SendSolicitation send http solicitation message

func SendSynchronization

func SendSynchronization(synchronization HTTPSynchronization, tAddr, tPort string) error

SendSynchronization send http synchronization message

Types

type HTTPGossip

type HTTPGossip struct {
	Addr        string              `json:"http_gossip_addr"`
	Port        string              `json:"http_gossip_port"`
	RoundNumber *round.GossipRound  `json:"http_gossip_round_number"`
	Digests     buffer.DigestBuffer `json:"http_gossip_digests"`
}

HTTPGossip is gossip message for http server

type HTTPSolicitation

type HTTPSolicitation struct {
	Addr        string              `json:"http_solicitation_addr"`
	Port        string              `json:"http_solicitation_port"`
	RoundNumber *round.GossipRound  `json:"http_solicitation_round_number"`
	Digests     buffer.DigestBuffer `json:"http_solicitation_digests"`
}

HTTPSolicitation is solicitation message for http server

type HTTPSynchronization

type HTTPSynchronization struct {
	Addr     string               `json:"http_synchronization_addr"`
	Port     string               `json:"http_synchronization_port"`
	Messages buffer.MessageBuffer `json:"http_synchronization_digests"`
}

httppSynchronization is synchronization message for http server

Jump to

Keyboard shortcuts

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