genki

package module
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 11 Imported by: 0

README

genki - microservice toolkit

Enki (𒂗𒆠) is the Sumerian god of knowledge, crafts and creation. Combine it with the awesome Go language, and you get Genki, my personal microservice toolkit.

TODO: Write a fancy README

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Documentation

Index

Constants

View Source
const (
	DefaultName               = "genki"
	HttpDebugPortConfigKey    = "http-debug-port"
	HttpDebugDisableConfigKey = "http-debug-disable"
)

Variables

This section is empty.

Functions

func Flags

func Flags() *pflag.FlagSet

Types

type Application

type Application interface {
	// Name of the application
	Name() string
	// Run the application. This is a blocking call and will only return if the
	// server is shut-down or an error occurred.
	Run(healthServer grpc_health_v1.HealthServer) error
	// Opts returns the current options
	Opts() Options
	// AddServer registers a new server with the application
	AddServer(server server.Server)
	// AddHttpServer registers a new http server with the application
	AddHttpServer(srv http.Server)
	// RegisterBroker registers a message broker implementation (AMQP, NATS, ...)
	RegisterBroker(broker broker.Broker)
}

Application defines the application interface. It's designed to be simple and straightforward.

func NewApplication

func NewApplication(options ...Option) Application

type Option

type Option func(options *Options)

func DisableDebugHttpServer

func DisableDebugHttpServer() Option

func HttpDebugServerPort

func HttpDebugServerPort(port string) Option

func Name

func Name(name string) Option

type Options

type Options struct {
	Name                   string
	HttpDebugServerEnabled bool
	HttpDebugServerPort    string
}

Jump to

Keyboard shortcuts

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