Back to godoc.org
go.etcd.io/etcd / error

Package error

v0.2.0
Latest Go to latest

The latest major version is .

Published: Dec 23, 2013 | License: Apache-2.0 | Module: go.etcd.io/etcd

Index

Constants

const (
	EcodeKeyNotFound    = 100
	EcodeTestFailed     = 101
	EcodeNotFile        = 102
	EcodeNoMorePeer     = 103
	EcodeNotDir         = 104
	EcodeNodeExist      = 105
	EcodeKeyIsPreserved = 106
	EcodeRootROnly      = 107
	EcodeDirNotEmpty    = 108

	EcodeValueRequired      = 200
	EcodePrevValueRequired  = 201
	EcodeTTLNaN             = 202
	EcodeIndexNaN           = 203
	EcodeValueOrTTLRequired = 204

	EcodeRaftInternal = 300
	EcodeLeaderElect  = 301

	EcodeWatcherCleared    = 400
	EcodeEventIndexCleared = 401
)

func Message

func Message(code int) string

type Error

type Error struct {
	ErrorCode int    `json:"errorCode"`
	Message   string `json:"message"`
	Cause     string `json:"cause,omitempty"`
	Index     uint64 `json:"index"`
}

func NewError

func NewError(errorCode int, cause string, index uint64) *Error

func (Error) Error

func (e Error) Error() string

Only for error interface

func (Error) Write

func (e Error) Write(w http.ResponseWriter)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier