server

package
v0.0.0-...-e797cc8 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

See https://github.com/go-openapi/kvstore/blob/master/cmd/kvstored/main.go as middlewares example

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCorsMiddleware

func NewCorsMiddleware() alice.Constructor

NewAuditMW returns a new Audit middleware

Types

type Config

type Config struct {
	LogLevel      string
	Postgres      storage.PostgresConfig
	NATS          nats.Config
	RESTListen    int
	Twitterclient twitterclient.Config
}

Config is configuration for the Server

type Instance

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

Instance stores the server state

func NewInstance

func NewInstance(config *Config, providers Providers) *Instance

NewInstance creates new server instance and copy config into that.

func (*Instance) Start

func (instance *Instance) Start()

Start does startup all dependencies (postgres connections pool, gRPC server, etc..)

type Providers

type Providers struct {
	TwitterClientProvider TwitterClientProvider
}

type TwitterClientProvider

type TwitterClientProvider func(config twitterclient.Config) twitterclient.Interface

Jump to

Keyboard shortcuts

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