Documentation
¶
Index ¶
- func CheckHealthy(c echo.Context) error
- type ApiMicroService
- type Group
- type GrpcService
- type HandleFunc
- type HttpService
- type HttpVerb
- type MicService
- type MicroService
- type Option
- type Options
- type Route
- type RunMode
- type Service
- func (s *Service) DELETE(prefix string, f HandleFunc)
- func (s *Service) Get(prefix string, f HandleFunc)
- func (bs *Service) Group(prefix string) *Group
- func (bs *Service) Init()
- func (s *Service) POST(prefix string, f HandleFunc)
- func (s *Service) PUT(prefix string, f HandleFunc)
- func (bs *Service) RegisterService(dsAddress, namespaceId string)
- func (bs *Service) Run()
- type ServiceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHealthy ¶ added in v0.1.2
func CheckHealthy(c echo.Context) error
Types ¶
type ApiMicroService ¶ added in v0.1.2
type ApiMicroService struct { }
func (*ApiMicroService) NewServer ¶ added in v0.1.2
func (a *ApiMicroService) NewServer() *echo.Echo
type Group ¶ added in v0.1.2
type Group struct {
// contains filtered or unexported fields
}
func (*Group) DELETE ¶ added in v0.1.2
func (g *Group) DELETE(prefix string, f HandleFunc)
func (*Group) Get ¶ added in v0.1.2
func (g *Group) Get(prefix string, f HandleFunc)
func (*Group) POST ¶ added in v0.1.2
func (g *Group) POST(prefix string, f HandleFunc)
func (*Group) PUT ¶ added in v0.1.2
func (g *Group) PUT(prefix string, f HandleFunc)
type GrpcService ¶ added in v0.1.2
type GrpcService struct { Opts Options Service *grpc.Server ServiceDiscovery func(dsAddress, namespaceId string) // contains filtered or unexported fields }
func (*GrpcService) Init ¶ added in v0.1.2
func (gs *GrpcService) Init(groups map[string]*Group)
func (*GrpcService) New ¶ added in v0.1.2
func (gs *GrpcService) New() interface{}
func (*GrpcService) Run ¶ added in v0.1.2
func (gs *GrpcService) Run()
type HandleFunc ¶ added in v0.1.2
type HandleFunc func(c echo.Context) error
type HttpService ¶ added in v0.1.2
type HttpService struct { Opts Options Service *echo.Echo ServiceDiscovery func(dsAddress, namespaceId string) // contains filtered or unexported fields }
func (*HttpService) Init ¶ added in v0.1.2
func (hs *HttpService) Init(groups map[string]*Group)
func (*HttpService) New ¶ added in v0.1.2
func (hs *HttpService) New() interface{}
func (*HttpService) Run ¶ added in v0.1.2
func (hs *HttpService) Run()
type MicService ¶
type MicService struct { GrpcServer *grpc.Server Routes map[string]func(http.ResponseWriter, *http.Request) }
func (*MicService) NewServer ¶
func (m *MicService) NewServer()
func (*MicService) Start ¶
func (m *MicService) Start(serviceName string)
type MicroService ¶ added in v0.1.2
type Option ¶ added in v0.1.2
type Option func(opts *Options)
func SetServiceType ¶ added in v0.1.2
func SetServiceType(serviceType ServiceType) Option
type Service ¶ added in v0.1.2
type Service struct { Instance interface{} // contains filtered or unexported fields }
func (*Service) DELETE ¶ added in v0.1.2
func (s *Service) DELETE(prefix string, f HandleFunc)
func (*Service) Get ¶ added in v0.1.2
func (s *Service) Get(prefix string, f HandleFunc)
func (*Service) POST ¶ added in v0.1.2
func (s *Service) POST(prefix string, f HandleFunc)
func (*Service) PUT ¶ added in v0.1.2
func (s *Service) PUT(prefix string, f HandleFunc)
func (*Service) RegisterService ¶ added in v0.1.2
注册服务
type ServiceType ¶ added in v0.1.2
type ServiceType uint8
const ( Http ServiceType = 1 GRPC ServiceType = 2 )
Click to show internal directories.
Click to hide internal directories.