toy

package
v0.0.0-...-0071f02 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BucketName string
	Port       int
}

Config holds the static config our server needs

func (*Config) Flags

func (c *Config) Flags() []cli.Flag

Flags returns a slice of urfave.Flag to allow our configuration to be populated by flags or env vars

type Server

type Server struct {

	// Router is exposed to allow us to call ServeHTTP directly when needed
	Router *chi.Mux
	// contains filtered or unexported fields
}

Server represents all of the config and clients needed to run our app

func New

func New(c *Config, bucket *blob.Bucket) *Server

New tries to cerate a new instance of Service

func (*Server) Start

func (s *Server) Start()

Start starts the server

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server gracefully

Jump to

Keyboard shortcuts

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