Documentation
¶
Index ¶
- Variables
- func ContainsArray(str string, targetStr ...string) bool
- func ContainsInArray(strArray []string, targetStr string) bool
- func FormatTime(tm *time.Time) string
- func FreeChanBool(flag chan bool)
- func GetChanBool() chan bool
- func GetGroupId(re *http.Request) string
- func GetGroupIds(re *http.Request) []string
- func GetLiveTime(re *http.Request) int
- func GetMessage(re *http.Request) string
- func GetSize(re *http.Request) int
- func GetStart(re *http.Request) int
- func GetUsername(re *http.Request) string
- func HttpCross(w http.ResponseWriter)
- func HttpCrossChunked(w http.ResponseWriter)
- func Millisecond() uint32
- func NewPtr(v interface{}) interface{}
- type HttpServer
- func (hs *HttpServer) AddRoute(pattern string, handler func(http.ResponseWriter, *http.Request))
- func (hs *HttpServer) IsTls() bool
- func (hs *HttpServer) Start(port int) error
- func (hs *HttpServer) StartAutoTLS(port int, certFile, keyFile string) error
- func (hs *HttpServer) StartTLS(port int, certFile, keyFile string) error
- type Queue
- func (queue *Queue) Dequeue(ctx context.Context) (value interface{}, num int32, cols bool)
- func (queue *Queue) Num() int32
- func (queue *Queue) Offer(value interface{}) (num int32)
- func (queue *Queue) Peek() (value interface{}, num int32)
- func (queue *Queue) Poll() (value interface{}, num int32)
- func (queue *Queue) Take(duration time.Duration) (value interface{}, num int32)
- type Request
- type RetryTransport
- type VQueue
- func (queue *VQueue) Dequeue(ctx context.Context) (value interface{}, num int32, hasClose bool)
- func (queue *VQueue) Num() int32
- func (queue *VQueue) Offer(value interface{}) (nu int32)
- func (queue *VQueue) Poll() (value interface{}, nu int32)
- func (queue *VQueue) Take(duration time.Duration) (value interface{}, num int32)
Constants ¶
This section is empty.
Variables ¶
View Source
var TimestampFormat = "2006-01-02 15:04:05"
Functions ¶
func ContainsArray ¶ added in v0.1.6
func ContainsInArray ¶ added in v0.1.1
func FormatTime ¶
func FreeChanBool ¶
func FreeChanBool(flag chan bool)
func GetChanBool ¶
func GetChanBool() chan bool
func GetGroupId ¶
func GetGroupIds ¶
func GetLiveTime ¶
func GetMessage ¶
func GetUsername ¶
func HttpCross ¶
func HttpCross(w http.ResponseWriter)
func HttpCrossChunked ¶
func HttpCrossChunked(w http.ResponseWriter)
func Millisecond ¶
func Millisecond() uint32
Types ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer() *HttpServer
func (*HttpServer) AddRoute ¶
func (hs *HttpServer) AddRoute(pattern string, handler func(http.ResponseWriter, *http.Request))
func (*HttpServer) IsTls ¶
func (hs *HttpServer) IsTls() bool
func (*HttpServer) Start ¶
func (hs *HttpServer) Start(port int) error
func (*HttpServer) StartAutoTLS ¶
func (hs *HttpServer) StartAutoTLS(port int, certFile, keyFile string) error
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func NewRequest() *Request
type RetryTransport ¶
type RetryTransport struct { Transport http.RoundTripper Retries int }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.