server

package
v0.0.0-...-83a686f Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

README

Server

This is the first module (outermost layer) where the code becomes aware of the web framework.

Keeping this isolated allows us to easily upgrade and switch to something else if needed.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Components

type Components struct {
	Config *config.App
	// contains filtered or unexported fields
}

func NewComponents

func NewComponents(config *config.App) (*Components, error)

func (*Components) Run

func (c *Components) Run()

type Setup

type Setup interface {

	// Check returns an error if all the necessary setup is not complete
	Check(ctx context.Context) error

	// RunIfNeeded attempts to run the subroutines necessary, no more no less
	RunIfNeeded(ctx context.Context) error
}

Setup abstracts away:

1. Setting up the environment for running Tasques 2. Checking that things are set up

func NewSetup

func NewSetup(httpClient *http.Client, esClient *elasticsearch.Client, config *config.App) Setup

NewSetup returns a Setup implementation

Directories

Path Synopsis
binding

Jump to

Keyboard shortcuts

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