server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeBucket

func InitializeBucket(nc *nats.Conn) error

func StartEmbeddedNATS

func StartEmbeddedNATS(nc *nats.Conn, store string) (*nats.Conn, error)

Types

type Link struct {
	URL  string
	Name string
}

type Server

type Server struct {
	Conn   *nats.Conn
	Router *mux.Router
	Port   int
}

func NewServer

func NewServer() *Server

func (*Server) GetPage

func (s *Server) GetPage(w http.ResponseWriter, r *http.Request)

func (*Server) GetPages

func (s *Server) GetPages(w http.ResponseWriter, r *http.Request)

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) SetNatsConn

func (s *Server) SetNatsConn(nc *nats.Conn) *Server

func (*Server) SetPort

func (s *Server) SetPort(p int) *Server

func (*Server) SetRouter

func (s *Server) SetRouter(r *mux.Router) *Server

Jump to

Keyboard shortcuts

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