Documentation ¶
Overview ¶
Package pool 图片缓存池
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrImgFileOutdated = errors.New("img file outdated") ErrNoSuchImg = errors.New("no such img") ErrSendImg = errors.New("send image error") ErrGetMsg = errors.New("get msg error") )
View Source
var ( ErrInvalidNTURL = errors.New("invalid nt url") ErrInvalidNTRaw = errors.New("invalid nt raw") )
Functions ¶
func SendImageFromPool ¶
func SendImageFromPool(imgname, imgpath string, genimg func() error, send ctxext.NoCtxSendMsg, get ctxext.NoCtxGetMsg) error
SendImageFromPool ...
func SendRemoteImageFromPool ¶
func SendRemoteImageFromPool(imgname, imgurl string, send ctxext.NoCtxSendMsg, get ctxext.NoCtxGetMsg) error
SendRemoteImageFromPool ...
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
Image 图片数据
func NewImage ¶
func NewImage(send ctxext.NoCtxSendMsg, get ctxext.NoCtxGetMsg, name, f string) (m *Image, hassent bool, err error)
NewImage context name file
func (*Image) Push ¶
func (m *Image) Push(send ctxext.NoCtxSendMsg, get ctxext.NoCtxGetMsg) (hassent bool, err error)
Push context
Click to show internal directories.
Click to hide internal directories.