admin

package
v0.0.0-...-becd122 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONResponse

func JSONResponse(w http.ResponseWriter, data interface{}, code int) (int, error)

func NewBindingsHandler

func NewBindingsHandler(amqpServer *server.Server) http.Handler

func NewChannelsHandler

func NewChannelsHandler(amqpServer *server.Server) http.Handler

func NewConnectionsHandler

func NewConnectionsHandler(amqpServer *server.Server) http.Handler

func NewExchangesHandler

func NewExchangesHandler(amqpServer *server.Server) http.Handler

func NewOverviewHandler

func NewOverviewHandler(amqpServer *server.Server) http.Handler

func NewQueuesHandler

func NewQueuesHandler(amqpServer *server.Server) http.Handler

Types

type AdminServer

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

func NewAdminServer

func NewAdminServer(amqpServer *server.Server, host string, port string) *AdminServer

func (*AdminServer) Start

func (server *AdminServer) Start() error

type Binding

type Binding struct {
	Queue      string `json:"queue"`
	Exchange   string `json:"exchange"`
	RoutingKey string `json:"routing_key"`
}

type BindingsHandler

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

func (*BindingsHandler) ServeHTTP

func (h *BindingsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type BindingsResponse

type BindingsResponse struct {
	Items []*Binding `json:"items"`
}

type Channel

type Channel struct {
	ConnID    uint64
	ChannelID uint16
	Channel   string `json:"channel"`
	Vhost     string `json:"vhost"`
	User      string `json:"user"`
	Qos       string `json:"qos"`
	Confirm   bool   `json:"confirm"`

	Counters map[string]*metrics.TrackItem `json:"counters"`
}

type ChannelsHandler

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

func (*ChannelsHandler) ServeHTTP

func (h *ChannelsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type ChannelsResponse

type ChannelsResponse struct {
	Items []*Channel `json:"items"`
}

type Connection

type Connection struct {
	ID            int                `json:"id"`
	Vhost         string             `json:"vhost"`
	Addr          string             `json:"addr"`
	ChannelsCount int                `json:"channels_count"`
	User          string             `json:"user"`
	Protocol      string             `json:"protocol"`
	FromClient    *metrics.TrackItem `json:"from_client"`
	ToClient      *metrics.TrackItem `json:"to_client"`
}

type ConnectionsHandler

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

func (*ConnectionsHandler) ServeHTTP

func (h *ConnectionsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type ConnectionsResponse

type ConnectionsResponse struct {
	Items []*Connection `json:"items"`
}

type Exchange

type Exchange struct {
	Name       string             `json:"name"`
	Vhost      string             `json:"vhost"`
	Type       string             `json:"type"`
	Durable    bool               `json:"durable"`
	Internal   bool               `json:"internal"`
	AutoDelete bool               `json:"auto_delete"`
	MsgRateIn  *metrics.TrackItem `json:"msg_rate_in"`
	MsgRateOut *metrics.TrackItem `json:"msg_rate_out"`
}

type ExchangesHandler

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

func (*ExchangesHandler) ServeHTTP

func (h *ExchangesHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type ExchangesResponse

type ExchangesResponse struct {
	Items []*Exchange `json:"items"`
}

type Metric

type Metric struct {
	Name   string               `json:"name"`
	Sample []*metrics.TrackItem `json:"sample"`
}

type OverviewHandler

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

func (*OverviewHandler) ServeHTTP

func (h *OverviewHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type OverviewResponse

type OverviewResponse struct {
	Metrics  []*Metric      `json:"metrics"`
	Counters map[string]int `json:"counters"`
}

type Queue

type Queue struct {
	Name       string `json:"name"`
	Vhost      string `json:"vhost"`
	Durable    bool   `json:"durable"`
	AutoDelete bool   `json:"auto_delete"`
	Exclusive  bool   `json:"exclusive"`

	Counters map[string]*metrics.TrackItem `json:"counters"`
}

type QueuesHandler

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

func (*QueuesHandler) ServeHTTP

func (h *QueuesHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type QueuesResponse

type QueuesResponse struct {
	Items []*Queue `json:"items"`
}

Jump to

Keyboard shortcuts

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