core

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

README

GoDoc

core

import "github.com/go-coldbrew/core"

package core is the core module for cold brew and provides the base implementation for Cold Brew.

The idea behind cold brew is simple, we want to reuse as many good components that we can by providing only a thin wrapper around them if needed.

The components in use by cold brew currently are
github.com/grpc-ecosystem/grpc-gateway
github.com/prometheus/client_golang
github.github.com/afex/hystrix-go
github.com/opentracing/opentracing-go
github.com/newrelic/go-agent

Index

type CB

type CB interface {
    SetService(CBService) error
    Run() error
    SetOpenAPIHandler(http.Handler)
    Stop(time.Duration) error
}
func New
func New(c config.Config) CB

New creates a new ColdBrew object

type CBService

type CBService interface {
    InitHTTP(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error
    InitGRPC(ctx context.Context, server *grpc.Server) error
}

type CBStopper

type CBStopper interface {
    Stop()
}

Generated by gomarkdoc

Documentation

Overview

package core is the core module for cold brew and provides the base implementation for Cold Brew.

The idea behind cold brew is simple, we want to reuse as many good components that we can by providing only a thin wrapper around them if needed.

The components in use by cold brew currently are

github.com/grpc-ecosystem/grpc-gateway
github.com/prometheus/client_golang
github.github.com/afex/hystrix-go
github.com/opentracing/opentracing-go
github.com/newrelic/go-agent

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CB

type CB interface {
	SetService(CBService) error
	Run() error
	SetOpenAPIHandler(http.Handler)
	Stop(time.Duration) error
}

func New

func New(c config.Config) CB

New creates a new ColdBrew object

type CBService

type CBService interface {
	InitHTTP(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error
	InitGRPC(ctx context.Context, server *grpc.Server) error
}

type CBStopper added in v0.1.1

type CBStopper interface {
	Stop()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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