package calls
import "github.com/mesos/mesos-go/api/v1/lib/executor/calls"
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 Heartbeat() *executor.Call
- 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
- func NonStreaming(c *executor.Call) RequestFunc
- func (f RequestFunc) Call() *executor.Call
- func (f RequestFunc) Marshaler() encoding.Marshaler
- type RequestStreaming
- type RequestStreamingFunc
- func Empty() RequestStreamingFunc
- func FromChan(ch <-chan *executor.Call) RequestStreamingFunc
- func Push(r RequestStreaming, c ...*executor.Call) RequestStreamingFunc
- func (f RequestStreamingFunc) Call() *executor.Call
- func (f RequestStreamingFunc) IsStreaming()
- func (f RequestStreamingFunc) Marshaler() encoding.Marshaler
- func (f RequestStreamingFunc) Push(c ...*executor.Call) RequestStreamingFunc
- type Sender
- type SenderFunc
Functions ¶
func CallNoData ¶
CallNoData is a convenience func that executes the given Call using the provided Caller and always drops the response data.
func Executor ¶
Executor sets a executor.Call's ExecutorID
func Framework ¶
Framework sets a executor.Call's FrameworkID
func Heartbeat ¶
Heartbeat returns an executor heartbeat call, useful to detect disconnections.
func Message ¶
Message returns an executor call with the given parameters.
func SendNoData ¶
SendNoData is a convenience func that executes the given Call using the provided Sender and always drops the response data.
func Subscribe ¶
func Subscribe(unackdTasks []mesos.TaskInfo, unackdUpdates []executor.Call_Update) *executor.Call
Subscribe returns an executor call with the given parameters.
func Update ¶
Update returns an executor call with the given parameters.
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
func (CallerFunc) Call ¶
Call implements the Caller interface for CallerFunc
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 Empty ¶
func Empty() RequestStreamingFunc
Empty generates a stream that always returns nil.
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 Sender ¶
Send issues a Request to a Mesos agent and properly manages Call-specific mechanics.
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.
func (SenderFunc) Send ¶
func (f SenderFunc) Send(ctx context.Context, r Request) (mesos.Response, error)
Send implements the Sender interface for SenderFunc
Source Files ¶
calls.go calls_caller_generated.go calls_sender_generated.go gen.go
- Version
- v0.0.11 (latest)
- Published
- May 15, 2020
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 5 hours ago –
Tools for package owners.