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 ¶
CallNoData is a convenience func that executes the given Call using the provided Caller and always drops the response data.
func SendNoData ¶
SendNoData is a convenience func that executes the given Call using the provided Sender and always drops the response data.
Types ¶
type Caller ¶
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 ¶
CallerFunc is the functional adaptation of the Caller interface
type Request ¶
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 ¶
RequestFunc is the functional adaptation of Request.
func NonStreaming ¶
func NonStreaming(c *executor.Call) RequestFunc
NonStreaming returns a RequestFunc that always generates the same Call.
func (RequestFunc) Call ¶
func (f RequestFunc) Call() *executor.Call
func (RequestFunc) Marshaler ¶
func (f RequestFunc) Marshaler() encoding.Marshaler
type RequestStreaming ¶
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 ¶
RequestStreamingFunc is the functional adaptation of RequestStreaming.
func FromChan ¶
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 ¶
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 ¶
func (f RequestStreamingFunc) Call() *executor.Call
func (RequestStreamingFunc) IsStreaming ¶
func (f RequestStreamingFunc) IsStreaming()
func (RequestStreamingFunc) Marshaler ¶
func (f RequestStreamingFunc) Marshaler() encoding.Marshaler
func (RequestStreamingFunc) Push ¶
func (f RequestStreamingFunc) Push(c ...*executor.Call) RequestStreamingFunc
type SenderFunc ¶
SenderFunc is the functional adaptation of the Sender interface
func IgnoreResponse ¶
func IgnoreResponse(s Sender) SenderFunc
IgnoreResponse generates a sender that closes any non-nil response received by Mesos.
func SenderWith ¶
func SenderWith(s Sender, opts ...executor.CallOpt) SenderFunc
SendWith injects the given options for all calls.