Documentation ¶
Index ¶
- func CallNoData(ctx context.Context, caller Caller, call *executor.Call) error
- func Executor(id string) executor.CallOpt
- func Framework(id string) executor.CallOpt
- func Message(data []byte) *executor.Call
- func SendNoData(ctx context.Context, sender Sender, r Request) (err error)
- func Subscribe(unackdTasks []mesos.TaskInfo, unackdUpdates []executor.Call_Update) *executor.Call
- func Update(status mesos.TaskStatus) *executor.Call
- type Caller
- type CallerFunc
- type Request
- type RequestFunc
- type RequestStreaming
- type RequestStreamingFunc
- type Sender
- type SenderFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallNoData ¶ added in v0.0.4
CallNoData is a convenience func that executes the given Call using the provided Caller and always drops the response data.
func SendNoData ¶ added in v0.0.5
SendNoData is a convenience func that executes the given Call using the provided Sender and always drops the response data.
Types ¶
type Caller ¶ added in v0.0.4
type Caller interface { // Call issues a call to Mesos and properly manages call-specific HTTP response headers & data. Call(context.Context, *executor.Call) (mesos.Response, error) }
Caller is the public interface this framework scheduler's should consume
type CallerFunc ¶ added in v0.0.4
CallerFunc is the functional adaptation of the Caller interface
type Request ¶ added in v0.0.5
Request generates a Call that's sent to a Mesos agent. Subsequent invocations are expected to yield equivalent calls. Intended for use w/ non-streaming requests to an agent.
type RequestFunc ¶ added in v0.0.5
RequestFunc is the functional adaptation of Request.
func NonStreaming ¶ added in v0.0.5
func NonStreaming(c *executor.Call) RequestFunc
NonStreaming returns a RequestFunc that always generates the same Call.
func (RequestFunc) Call ¶ added in v0.0.5
func (f RequestFunc) Call() *executor.Call
func (RequestFunc) Marshaler ¶ added in v0.0.5
func (f RequestFunc) Marshaler() encoding.Marshaler
type RequestStreaming ¶ added in v0.0.5
type RequestStreaming interface { Request IsStreaming() }
RequestStreaming generates a Call that's send to a Mesos agent. Subsequent invocations MAY generate different Call objects. No more Call objects are expected once a nil is returned to signal the end of of the request stream.
type RequestStreamingFunc ¶ added in v0.0.5
RequestStreamingFunc is the functional adaptation of RequestStreaming.
func Empty ¶ added in v0.0.5
func Empty() RequestStreamingFunc
Empty generates a stream that always returns nil.
func FromChan ¶ added in v0.0.5
func FromChan(ch <-chan *executor.Call) RequestStreamingFunc
FromChan returns a streaming request that fetches calls from the given channel until it closes. If a nil chan is specified then the returned func will always generate nil.
func Push ¶ added in v0.0.5
func Push(r RequestStreaming, c ...*executor.Call) RequestStreamingFunc
Push prepends one or more calls onto a request stream. If no calls are given then the original stream is returned.
func (RequestStreamingFunc) Call ¶ added in v0.0.5
func (f RequestStreamingFunc) Call() *executor.Call
func (RequestStreamingFunc) IsStreaming ¶ added in v0.0.5
func (f RequestStreamingFunc) IsStreaming()
func (RequestStreamingFunc) Marshaler ¶ added in v0.0.5
func (f RequestStreamingFunc) Marshaler() encoding.Marshaler
func (RequestStreamingFunc) Push ¶ added in v0.0.5
func (f RequestStreamingFunc) Push(c ...*executor.Call) RequestStreamingFunc
type Sender ¶ added in v0.0.5
Send issues a Request to a Mesos agent and properly manages Call-specific mechanics.
type SenderFunc ¶ added in v0.0.5
SenderFunc is the functional adaptation of the Sender interface
func IgnoreResponse ¶ added in v0.0.5
func IgnoreResponse(s Sender) SenderFunc
IgnoreResponse generates a sender that closes any non-nil response received by Mesos.
func SenderWith ¶ added in v0.0.5
func SenderWith(s Sender, opts ...executor.CallOpt) SenderFunc
SendWith injects the given options for all calls.