add contracts
This commit is contained in:
@@ -24,6 +24,7 @@ func init() {
|
|||||||
go func() {
|
go func() {
|
||||||
<-ctx.Done()
|
<-ctx.Done()
|
||||||
Close()
|
Close()
|
||||||
|
cancel()
|
||||||
}()
|
}()
|
||||||
Cancel = cancel
|
Cancel = cancel
|
||||||
return ctx
|
return ctx
|
||||||
|
|||||||
8
contracts/http.go
Normal file
8
contracts/http.go
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package contracts
|
||||||
|
|
||||||
|
type Route interface{}
|
||||||
|
|
||||||
|
type HttpService interface {
|
||||||
|
Serve() error
|
||||||
|
GetEngine() interface{}
|
||||||
|
}
|
||||||
6
contracts/micro.go
Normal file
6
contracts/micro.go
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package contracts
|
||||||
|
|
||||||
|
type MicroService interface {
|
||||||
|
Serve() error
|
||||||
|
GetEngine() any
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user