github.com/hdt3213/godis@v1.2.9/interface/tcp/handler.go (about) 1 package tcp 2 3 import ( 4 "context" 5 "net" 6 ) 7 8 // HandleFunc represents application handler function 9 type HandleFunc func(ctx context.Context, conn net.Conn) 10 11 // Handler represents application server over tcp 12 type Handler interface { 13 Handle(ctx context.Context, conn net.Conn) 14 Close() error 15 }