parrot: github.com/tserkov/parrot/pkg/webserver Index | Files

package webserver

import "github.com/tserkov/parrot/pkg/webserver"

Package webserver serves the web dashboard from either embedded files (prod) or app directory (dev), as well as provide the SSE server endpoint.

Index

Package Files

webserver.go

type Server Uses

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

func New Uses

func New(addr string, sseServer *sse.Server) *Server

Start beings serving the web dashboard at the specified address, and sets up the endpoint for the provided SSE server.

func (*Server) Shutdown Uses

func (s *Server) Shutdown() error

Shutdown cleanly stops the server listener.

func (*Server) Start Uses

func (s *Server) Start()

Start begins listening and serving the dashboard & SSE endpoint.

Package webserver imports 5 packages (graph) and is imported by 1 packages. Updated 2018-10-16. Refresh now. Tools for package owners.