httpTransport

package
v0.0.0-...-d7884b9 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package httpTransport provides a sample implementation of kshaka's transport interface This implementation uses net/http to communicate between different kshaka Nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptRequest

type AcceptRequest struct {
	B     kshaka.Ballot
	Key   []byte
	State []byte
}

AcceptRequest is the request sent during accept phase specifically for the HTTPtransport

type HTTPtransport

type HTTPtransport struct {
	NodeAddrress string
	NodePort     string
	ProposeURI   string
	PrepareURI   string
	AcceptURI    string
}

HTTPtransport provides a http based transport that can be used to communicate with kshaka/CASPaxos on remote machines.

func (*HTTPtransport) TransportAccept

func (ht *HTTPtransport) TransportAccept(b kshaka.Ballot, key []byte, state []byte) (kshaka.AcceptorState, error)

TransportAccept implements the Transport interface.

func (*HTTPtransport) TransportPrepare

func (ht *HTTPtransport) TransportPrepare(b kshaka.Ballot, key []byte) (kshaka.AcceptorState, error)

TransportPrepare implements the Transport interface.

type PrepareRequest

type PrepareRequest struct {
	B   kshaka.Ballot
	Key []byte
}

PrepareRequest is the request sent during prepare phase specifically for the HTTPtransport

Jump to

Keyboard shortcuts

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