mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 10:09:54 +08:00
This commit is contained in:
32
server/internal/service/tcpserver.go
Normal file
32
server/internal/service/tcpserver.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// ================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type (
|
||||
ITCPServer interface {
|
||||
Start(ctx context.Context)
|
||||
Stop(ctx context.Context)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localTCPServer ITCPServer
|
||||
)
|
||||
|
||||
func TCPServer() ITCPServer {
|
||||
if localTCPServer == nil {
|
||||
panic("implement not found for interface ITCPServer, forgot register?")
|
||||
}
|
||||
return localTCPServer
|
||||
}
|
||||
|
||||
func RegisterTCPServer(i ITCPServer) {
|
||||
localTCPServer = i
|
||||
}
|
Reference in New Issue
Block a user