nsqadmin

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2015 License: MIT Imports: 29 Imported by: 0

README

nsqadmin

nsqadmin is a Web UI to view aggregated cluster stats in realtime and perform various administrative tasks.

Read the docs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPServer

func NewHTTPServer(ctx *Context) *httpServer

func NewNSQAdminOptions

func NewNSQAdminOptions() *nsqadminOptions

func NewSingleHostReverseProxy

func NewSingleHostReverseProxy(target *url.URL, timeout time.Duration) *httputil.ReverseProxy

this is similar to httputil.NewSingleHostReverseProxy except it passes along basic auth

Types

type AdminAction

type AdminAction struct {
	Action    string `json:"action"`
	Topic     string `json:"topic"`
	Channel   string `json:"channel,omitempty"`
	Node      string `json:"node,omitempty"`
	Timestamp int64  `json:"timestamp"`
	User      string `json:"user,omitempty"`
	RemoteIP  string `json:"remote_ip"`
	UserAgent string `json:"user_agent"`
}

type Context

type Context struct {
	// contains filtered or unexported fields
}

type GraphInterval

type GraphInterval struct {
	Selected   bool
	Timeframe  string        // the UI string
	GraphFrom  string        // ?from=.
	GraphUntil string        // ?until=.
	Duration   time.Duration // for sort order
}

func GraphIntervalForTimeframe

func GraphIntervalForTimeframe(t string, selected bool) (*GraphInterval, error)

func (*GraphInterval) URLOption

func (g *GraphInterval) URLOption() template.URL

type GraphIntervals

type GraphIntervals []*GraphInterval

func DefaultGraphTimeframes

func DefaultGraphTimeframes(selected string) GraphIntervals

type GraphOptions

type GraphOptions struct {
	Configured        bool
	Enabled           bool
	GraphiteURL       string
	TimeframeString   template.URL
	AllGraphIntervals []*GraphInterval
	GraphInterval     *GraphInterval
	// contains filtered or unexported fields
}

func NewGraphOptions

func NewGraphOptions(rw http.ResponseWriter, req *http.Request,
	r *http_api.ReqParams, ctx *Context) *GraphOptions

func (*GraphOptions) LargeGraph

func (g *GraphOptions) LargeGraph(gr GraphTarget, key string) template.URL

func (*GraphOptions) Prefix

func (g *GraphOptions) Prefix(host string, metricType string) string

func (*GraphOptions) Rate

func (g *GraphOptions) Rate(gr GraphTarget) string

func (*GraphOptions) Sparkline

func (g *GraphOptions) Sparkline(gr GraphTarget, key string) template.URL

type GraphTarget

type GraphTarget interface {
	Target(key string) ([]string, string)
	Host() string
}

type NSQAdmin

type NSQAdmin struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewNSQAdmin

func NewNSQAdmin(opts *nsqadminOptions) *NSQAdmin

func (*NSQAdmin) Exit

func (n *NSQAdmin) Exit()

func (*NSQAdmin) Main

func (n *NSQAdmin) Main()

func (*NSQAdmin) RealHTTPAddr

func (n *NSQAdmin) RealHTTPAddr() *net.TCPAddr

type Node

type Node string

func (Node) Host

func (n Node) Host() string

func (Node) Target

func (n Node) Target(key string) ([]string, string)

type Topic

type Topic struct {
	TopicName string
}

func (*Topic) Host

func (t *Topic) Host() string

func (*Topic) Target

func (t *Topic) Target(key string) ([]string, string)

type Topics

type Topics []*Topic

func TopicsFromStrings

func TopicsFromStrings(s []string) Topics

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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