util

package
v0.0.0-...-fe81f67 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrStatus

func ErrStatus(w http.ResponseWriter, r *http.Request, message string, statusCode int, err error)

ErrStatus sends a http error status

func RetryPost

func RetryPost(val interface{}, url string, retry int) int

RetryPost posts the value to a remote endpoint. also retries

Types

type JoinRequest

type JoinRequest struct {
	NodeID string `json:"nodeID"`
	Addr   string `json:"addr"`
}

JoinRequest is the request to join a node

func (*JoinRequest) Validate

func (j *JoinRequest) Validate() error

Validate validates the request

Jump to

Keyboard shortcuts

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