Documentation
¶
Index ¶
- Constants
- Variables
- func ConnectZK() (*zk.Conn, error)
- func ExtractSpanFromHeaders(operationName string, r *http.Request) opentracing.Span
- func GetRemoteUser(r *http.Request) (string, bool)
- func InitTracing() (error, opentracing.Tracer, io.Closer)
- func IsOnRestrictedList(scheddName string, poolName string) bool
- func IsOnStandardList(scheddName string, poolName string) bool
- func IsPoolOK(poolName string) bool
- func LogAndSetHttpStatus(w http.ResponseWriter, r *http.Request, httpstatus int, methodName string, ...)
- func RequireUserIsAdmin(w http.ResponseWriter, r *http.Request, methodName string) (requestedUser string, authenticatedUser string, isAdmin bool, ok bool)
- func RequireUserIsAdminOrDealingWithSelf(w http.ResponseWriter, r *http.Request, methodName string) (requestedUser string, authenticatedUser string, isAdmin bool, ok bool)
- func SetupLogger()
- func SetupPools()
- func StringInSlice(a string, list []string) bool
- type ActiveUserMessage
- type GetUserMessage
- type NullLogger
- type PoolMap
- type PutUserMessage
- type ScheddList
- type ScheddUsers
Constants ¶
View Source
const ( SERVE_PORT_KEY = "serve.port" SERVE_ZK_CONN = "serve.zkconn" SERVE_ACL_KEY = "serve.acl" SERVE_ROOTPATH = "serve.rootpath" AUTHZ_GETMODE = "authz.getmode" INTERNAL_POOLS = "xipools" INTERNAL_POOLMAP = "xipoolmap" )
View Source
const (
SERVER_VERSION = "0.2"
)
Variables ¶
View Source
var WG_CTX_KEY wtfisctx
Functions ¶
func ExtractSpanFromHeaders ¶
func ExtractSpanFromHeaders(operationName string, r *http.Request) opentracing.Span
Extracts Span from headers or returns a root one
func InitTracing ¶
func InitTracing() (error, opentracing.Tracer, io.Closer)
initialising Jaeger client
func IsOnRestrictedList ¶
func IsOnStandardList ¶
func LogAndSetHttpStatus ¶
func RequireUserIsAdmin ¶
func SetupPools ¶
func SetupPools()
func StringInSlice ¶
Types ¶
type ActiveUserMessage ¶
type GetUserMessage ¶
type NullLogger ¶
type NullLogger struct{}
func (NullLogger) Printf ¶
func (n NullLogger) Printf(s string, i ...interface{})
type PoolMap ¶
type PoolMap struct {
Pools map[string]ScheddList
}
type PutUserMessage ¶
type ScheddList ¶
type ScheddUsers ¶
Click to show internal directories.
Click to hide internal directories.