utils

package
v0.0.0-...-a0ba87e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2013 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvInt

func EnvInt(name string, defaultVal int) int

func EnvString

func EnvString(name string, defaultVal string) string

func EnvUint64

func EnvUint64(name string, defaultVal uint64) uint64

func LockPartition

func LockPartition(ns string, max, ttl uint64) (uint64, error)

func MeasureI

func MeasureI(measurement string, val int64)

func MeasureT

func MeasureT(measurement string, t time.Time)

func ParseRedisUrl

func ParseRedisUrl() (string, string, error)

func ParseToken

func ParseToken(r *http.Request) (string, error)

func RoundTime

func RoundTime(t time.Time, d time.Duration) time.Time

func WriteJson

func WriteJson(w http.ResponseWriter, status int, data interface{})

Convenience

func WriteJsonBytes

func WriteJsonBytes(w http.ResponseWriter, status int, b []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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