Refactored package structure.
This commit is contained in:
20
types/types.go
Normal file
20
types/types.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Dialer interface {
|
||||
Dial(urlStr string, requestHeader http.Header) (Socket, *http.Response, error)
|
||||
}
|
||||
|
||||
type Socket interface {
|
||||
WriteMessage(messageType int, data []byte) error
|
||||
ReadMessage() (messageType int, p []byte, err error)
|
||||
Close() error
|
||||
|
||||
SetReadDeadline(t time.Time) error
|
||||
SetWriteDeadline(t time.Time) error
|
||||
SetCloseHandler(h func(code int, text string) error)
|
||||
}
|
||||
Reference in New Issue
Block a user