command
module
Version:
v0.1.9
Opens a new window with list of versions in this module.
Published: Jan 9, 2021
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
microgo
The Microservice Framework develop by go
example
main
package main
import (
"context"
"github.com/seefan/microgo/server/httpserver"
"github.com/seefan/microgo/test"
)
func main() {
s := httpserver.NewHTTPServer("localhost", 8888)
s.Register(&test.TestService{})
if err := s.Start(context.Background()); err != nil {
println(err.Error())
}
}
service
package test
import (
"github.com/seefan/microgo/service"
)
type TestService struct {
}
func (TestService) Hello(entry service.Entry) string {
name := entry.Get("name")
return "hello " + name
}
func (TestService) Name() string {
return "test"
}
func (TestService) Version() string {
return "1.0"
}
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
|
|
|
|
@Time : 2019-01-19 10:50 @Author : seefan @File : archive.go @Software: microgo
|
@Time : 2019-01-19 10:50 @Author : seefan @File : archive.go @Software: microgo |
|
|
|
|
|
|
|
|
|
|
@Time : 2019-01-25 16:43 @Author : seefan @File : file @Software: microgo
|
@Time : 2019-01-25 16:43 @Author : seefan @File : file @Software: microgo |
Click to show internal directories.
Click to hide internal directories.