Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppFlatSet ¶
func (*AppFlatSet) GetSampleEnvs ¶
func (f *AppFlatSet) GetSampleEnvs()
func (*AppFlatSet) Parse ¶
func (f *AppFlatSet) Parse(args []string)
type Function ¶
type Function func(ctx ServiceContext) error
type HashPrefix ¶
type HashPrefix interface { GetPrefix() string Get() interface{} }
type HttpServer ¶
type HttpServer interface { Runnable // AddHandler - Add handlers to GIN Server AddHandler(HttpServerHandler) // URI - That the server is listening URI() string }
type HttpServerHandler ¶
type PrefixRunnable ¶
type PrefixRunnable interface { HashPrefix Runnable }
type Service ¶
type Service interface { // ServiceContext - A part of Service, it's passed to all handlers/functions ServiceContext // Name of the service Name() // Version of the service Version() // HttpServer - Gin HTTP Server wrapper HttpServer() HttpServer // Init with options, they can be db connections or // anything the service need handle before starting Init() error // IsRegistered - This method returns service if it is registered on discovery IsRegistered() bool // Start service and it's all component. // It will be stopped if any service return error Start() error // Stop service and it's all component. Stop() // OutEnv - Method export all flags to std/terminal // We might use: "> .env" to move its content .env file OutEnv() }
Service Interface -The heart of SDK, Service represents for a real micro service with its all components
type ServiceContext ¶
Click to show internal directories.
Click to hide internal directories.