update registry

This commit is contained in:
ginuerzh
2022-02-27 22:32:15 +08:00
parent 0aee4f0ebd
commit 07132d8de7
115 changed files with 651 additions and 680 deletions

View File

@ -95,7 +95,7 @@ func file_gost_proto_rawDescGZIP() []byte {
}
var file_gost_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_gost_proto_goTypes = []interface{}{
var file_gost_proto_goTypes = []any{
(*Chunk)(nil), // 0: Chunk
}
var file_gost_proto_depIdxs = []int32{
@ -114,7 +114,7 @@ func file_gost_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_gost_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_gost_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Chunk); i {
case 0:
return &v.state

View File

@ -88,7 +88,7 @@ func RegisterGostTunelServer(s grpc.ServiceRegistrar, srv GostTunelServer) {
s.RegisterService(&GostTunel_ServiceDesc, srv)
}
func _GostTunel_Tunnel_Handler(srv interface{}, stream grpc.ServerStream) error {
func _GostTunel_Tunnel_Handler(srv any, stream grpc.ServerStream) error {
return srv.(GostTunelServer).Tunnel(&gostTunelTunnelServer{stream})
}

View File

@ -28,7 +28,7 @@ func (p *ConnPool) WithLogger(logger logger.Logger) *ConnPool {
return p
}
func (p *ConnPool) Get(key interface{}) (c *Conn, ok bool) {
func (p *ConnPool) Get(key any) (c *Conn, ok bool) {
v, ok := p.m.Load(key)
if ok {
c, ok = v.(*Conn)
@ -36,11 +36,11 @@ func (p *ConnPool) Get(key interface{}) (c *Conn, ok bool) {
return
}
func (p *ConnPool) Set(key interface{}, c *Conn) {
func (p *ConnPool) Set(key any, c *Conn) {
p.m.Store(key, c)
}
func (p *ConnPool) Delete(key interface{}) {
func (p *ConnPool) Delete(key any) {
p.m.Delete(key)
}
@ -53,7 +53,7 @@ func (p *ConnPool) Close() {
close(p.closed)
p.m.Range(func(k, v interface{}) bool {
p.m.Range(func(k, v any) bool {
if c, ok := v.(*Conn); ok && c != nil {
c.Close()
}
@ -70,7 +70,7 @@ func (p *ConnPool) idleCheck() {
case <-ticker.C:
size := 0
idles := 0
p.m.Range(func(key, value interface{}) bool {
p.m.Range(func(key, value any) bool {
c, ok := value.(*Conn)
if !ok || c == nil {
p.Delete(key)