-
Notifications
You must be signed in to change notification settings - Fork 1
/
core.go
39 lines (32 loc) · 944 Bytes
/
core.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package components
import (
logger "github.com/sirupsen/logrus"
"github.com/geomyidia/go-svc-conventions/pkg/components/config"
"github.com/geomyidia/go-svc-conventions/pkg/components/db"
"github.com/geomyidia/go-svc-conventions/pkg/components/grpcd"
"github.com/geomyidia/go-svc-conventions/pkg/components/httpd"
"github.com/geomyidia/go-svc-conventions/pkg/components/msgbus"
)
// Base component collection
type Base struct {
Config *config.Config
Logger *logger.Logger
}
// TestBase component that keeps stdout clean
type TestBase struct {
Config *config.Config
}
// Default component collection
type Default struct {
Base
}
// Add more components here that have more or less than what's done above. This
// is useful for testing or runnning in different binaries/executables, etc.
// Application ...
type Application struct {
Default
Bus *msgbus.MsgBus
DB *db.DB
HTTPD *httpd.HTTPServer
GRPCD *grpcd.GRPCServer
}