go-asab

module
v0.0.0-...-af81d15 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: BSD-3-Clause

README

Asynchronous Server App Boilerplate (ASAB)

A micro-service framework for Go

Modeled after Pythonic https://github.com/TeskaLabs/asab

Quick start

main.go

package main

import (
	"github.com/teskalabs/go-asab/asab"
)

type MyApplication struct {
	asab.Application

	WebService       asab.WebService
}

func main() {
	asab.AddConfigDefaults("general", map[string]string{
		"config_file": "./etc/my.conf",
	})

	asab.AddConfigDefaults("web", map[string]string{
		"listen": "[::]:8895",
	})

	MyApp := new(MyApplication)
	MyApp.Application.Initialize()
	defer MyApp.Finalize()

	MyApp.WebService.Initialize(&MyApp.Application)
	defer MyApp.WebService.Finalize()

	MyApp.Run()
}

Check examples folder for more information.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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