Documentation ¶
Index ¶
- Constants
- Variables
- func DataType(dataType string) (reflect.Type, error)
- func GetHostIPv4(hostname string) (string, error)
- func Hash(source interface{}) int
- func IsAuthorized(request *http.Request, allowedSubset []string) bool
- func IsConnectionError(err error) bool
- func IsInvalidNode(err error) bool
- func IsKeyNotFound(err error) bool
- func IsTimeout(err error) bool
- func IsTransientError(err error) bool
- func SetHash(dest interface{}, hash int)
- type Dictionary
- type Hashed
- type Iterator
- type Layer
- type Pair
- type Storable
Constants ¶
const ( //CacheKey cache key CacheKey = "cache_key" //BatchSizeKey batch size key BatchSizeKey = "batch_size" )
const ( //ModelURI represents model eval URI template ModelURI = "/v1/api/model/%s/eval" //MetaURI represents model meta URI template MetaURI = "/v1/api/model/%s/meta/" //MetaConfigURI represents model meta config URI template MetaConfigURI = "/v1/api/model/%s/meta/config" //MetaDictionaryURI represents model meta dictionary URI template MetaDictionaryURI = "/v1/api/model/%s/meta/dictionary" )
const ( //StatusOK response status ok StatusOK = "ok" //StatusError represents error status StatusError = "error" //StatusCached represents cache status StatusCached = "cached" )
const (
//HashBin represents hash bin
HashBin = "dictHash"
)
const KeyDelimiter = '/'
KeyDelimiter key delimiter
const (
//MetricURI represents metric URI
MetricURI = "/v1/api/metric/"
)
Variables ¶
var ErrNodeDown = errors.New("node is down")
ErrNodeDown node down error
Functions ¶
func GetHostIPv4 ¶
GetHostIPv4 return host ipv4 address or error
func IsAuthorized ¶
IsAuthorized checks if request is authorized
func IsConnectionError ¶
IsConnectionError returns true if error is connection errpr
func IsInvalidNode ¶
IsInvalidNode returns true is node/cluster is down
func IsKeyNotFound ¶
IsKeyNotFound returns true if key not found error
func IsTransientError ¶
IsTransientError returns if transient error
Types ¶
type Dictionary ¶
Contains information for bounding cardinality
func (*Dictionary) UpdateHash ¶ added in v0.2.1
func (d *Dictionary) UpdateHash(fsHash int64) int
TODO this should use a fixed size integer? UpdateHash will memoize dictionary hashing. Since wildcard fields don't provide an actual dictionary, we use the modification time information to generate a hash based on the file, passed in as fsHash.
type Iterator ¶
Iterator represents iterator
func MapToIterator ¶
MapToIterator create an iterator for supplied map