open-falcon-backend

command module
v3.12.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

README

Open-Falcon Backend

Open-Falcon

Build Status codecov GoDoc Code Health Code Issues Go Report Card License

Documentations

Get Started

Start MySQL and Redis using docker

cd docker
docker-compose -f init.yml up -d
docker inspect docker_mysql_1
docker inspect docker_redis_1
cd ..

Change your environment setting

vi config/confgen.sh

Start Backend modules

make clean all pack
mkdir out
mv open-falcon-v2.0.0.tar.gz out/
cd out
tar zxvf open-falcon-v2.0.0.tar.gz
./open-falcon start agent graph transfer hbs fe query

Compilation

# all modules
make all

# specified module
make agent

Run Open-Falcon Commands

Agent for example:

./open-falcon agent [build|pack|start|stop|restart|status|tail]

Package Management

We use govendor to manage the golang packages. Please install govendor before compilation.

go get -u github.com/kardianos/govendor

Most depended packages are saved under ./vendor dir. If you want to add or update a package, just run govendor fetch xxxx@commitID or govendor fetch xxxx@v1.x.x, then you will find the package have been placed in ./vendor correctly.

Make sure you're using Go 1.5+ and GO15VENDOREXPERIMENT=1 env var is exported. (export GODEBUG=cgocheck=0 using Go 1.6+.)

Package Release

make clean all pack

Documentation

Overview

build !release

Directories

Path Synopsis
common
db
gin
Some convenient utility for usage of gin framework JSON service ginConfig := &GinConfig{ Mode: gin.ReleaseMode, Host: "localhost", Port: 8080, } engine := NewDefaultJsonEngine(ginConfig) // Start service // StartServiceOrExit(engine, ginConfig) // Binds the engine into existing HTTP service http.Handle("/root-service", engine) Panic in Code By using of "NewDefaultJsonEngine()", any panic code would be output as: { "http_status": 500, "error_code": -1, "error_message": fmt.Sprintf("%v", panicObject), } And the HTTP engine would keep running.
Some convenient utility for usage of gin framework JSON service ginConfig := &GinConfig{ Mode: gin.ReleaseMode, Host: "localhost", Port: 8080, } engine := NewDefaultJsonEngine(ginConfig) // Start service // StartServiceOrExit(engine, ginConfig) // Binds the engine into existing HTTP service http.Handle("/root-service", engine) Panic in Code By using of "NewDefaultJsonEngine()", any panic code would be output as: { "http_status": 500, "error_code": -1, "error_message": fmt.Sprintf("%v", panicObject), } And the HTTP engine would keep running.
gin/mvc
A MVC binder for free-style of function handler with *gin.Context Abstract There are may tedious processes for coding on web service: 1.
A MVC binder for free-style of function handler with *gin.Context Abstract There are may tedious processes for coding on web service: 1.
net
os
rpc
runtime
Because go language does not have industrial level of exception handing mechanism, using the information of calling state is the only way to expose secret in code.
Because go language does not have industrial level of exception handing mechanism, using the information of calling state is the only way to expose secret in code.
testing/check
This package provindes extensions to "gopkg.in/check.v1".
This package provindes extensions to "gopkg.in/check.v1".
testing/db
The base environment for RDB testing Flags This package has pre-defined flags of command: -dsn_mysql - MySQL DSN used to intialize configuration of mysql connection
The base environment for RDB testing Flags This package has pre-defined flags of command: -dsn_mysql - MySQL DSN used to intialize configuration of mysql connection
textbuilder
This package provides lazy-loading and postfix binding for text building.
This package provides lazy-loading and postfix binding for text building.
types
This package provides out-of-box conversion service.
This package provides out-of-box conversion service.
utils
This package provides misc utilities.
This package provides misc utilities.
g
modules
fe
fe/grpc/proto/owlquery
Package owlapi is a generated protocol buffer package.
Package owlapi is a generated protocol buffer package.
hbs
query/grpc/proto/owlquery
Package owlapi is a generated protocol buffer package.
Package owlapi is a generated protocol buffer package.
scripts
mysql/dbpatch/go/changelog
As the loading process for change log
As the loading process for change log
mysql/dbpatch/go/sql
Connect and execute patch
Connect and execute patch

Jump to

Keyboard shortcuts

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