Documentation
¶
Index ¶
Constants ¶
View Source
const ( HTTP_TIMEOUT_DURATION = 10 * time.Second HTTP_KEEPALIVE_DURATION = 30 * time.Second USER_AGENT = "swan/0.1" MESOS_STREAM_KEY = "swan/0.1" )
Variables ¶
View Source
var SPECIAL_CHARACTER = regexp.MustCompile("([\\-\\.\\$\\*\\+\\?\\{\\}\\(\\)\\[\\]\\|]+)")
Functions ¶
Types ¶
type Connector ¶
type Connector struct { MesosZkPath *url.URL ClusterID string MesosLeader string MesosLeaderHttpClient *HttpClient EventChan chan *event.MesosEvent ErrorChan chan error FrameworkInfo *mesos.FrameworkInfo StreamCtx context.Context StreamCancelFun context.CancelFunc }
Connector create a persistent connection against mesos master to subscribe mesos event. caller could use: MesosEvent() to subscribe mesos events ErrEvent() to subscribe connnector's failures SendCall() to emit request against mesos master
func (*Connector) MesosEvent ¶
func (s *Connector) MesosEvent() chan *event.MesosEvent
func (*Connector) Reregister ¶
func (*Connector) SetFrameworkInfoId ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(addr, path string) *HttpClient
Click to show internal directories.
Click to hide internal directories.