Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (this *Client) AddJob(payload []byte, delay string, opt PubOption) (jobId string, err error)
- func (this *Client) AddTopic(cluster, appid, topic, ver string) (err error)
- func (this *Client) Close()
- func (this *Client) DeleteJob(jobId string, opt PubOption) (err error)
- func (this *Client) Pub(key string, msg []byte, opt PubOption) (err error)
- func (this *Client) Sub(opt SubOption, h SubHandler) error
- func (this *Client) SubX(opt SubOption, h SubXHandler) error
- type Config
- type PubOption
- type SubHandler
- type SubOption
- type SubXHandler
- type SubXResult
Constants ¶
View Source
const ( ShadowRetry = "retry" ShadowDead = "dead" UserAgent = "pubsub-go v0.1" )
Variables ¶
View Source
var ( ErrSubStop = errors.New("sub stopped") ErrInvalidBury = errors.New("invalid bury name") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { AppId string Secret string Timeout time.Duration KeepAlive time.Duration Sub struct { Scheme string // https or http Endpoint string // host:port } Pub struct { Scheme string // http or https Endpoint string // host:port } Admin struct { Scheme string Endpoint string } Debug bool }
func DefaultConfig ¶
type SubHandler ¶
type SubXHandler ¶
type SubXHandler func(statusCode int, msg []byte, r *SubXResult) error
type SubXResult ¶
func (*SubXResult) Reset ¶
func (this *SubXResult) Reset()
Click to show internal directories.
Click to hide internal directories.