Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRouter ¶
func NewRouter(producer *kafka.DefaultProducer, auth string, allowedIPs *zbxnet.AllowedPeers) http.Handler
NewRouter creates a mux http handler with all the routing handled.
func Run ¶
Run starts the server.
Types ¶
type BufferedResponseWriter ¶
type BufferedResponseWriter struct {
// contains filtered or unexported fields
}
BufferedResponseWriter response writer for http handler.
func (*BufferedResponseWriter) Header ¶
func (b *BufferedResponseWriter) Header() http.Header
Header returns set headers.
func (*BufferedResponseWriter) Write ¶
func (b *BufferedResponseWriter) Write(data []byte) (int, error)
Write writes data into buffer.
func (*BufferedResponseWriter) WriteHeader ¶
func (b *BufferedResponseWriter) WriteHeader(code int)
WriteHeader sets code for response.
func (*BufferedResponseWriter) WriteResponse ¶
func (b *BufferedResponseWriter) WriteResponse()
WriteResponse writes response as a json encoded text.
Click to show internal directories.
Click to hide internal directories.