• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mesos / mesos-go / 579

pending completion
579

Pull #304

travis-ci

web-flow
scheduler: only invoke non-nil functional options
Pull Request #304: [WIP] protos: upgrade to latest 1.2.x protobuf API

58 of 58 new or added lines in 4 files covered. (100.0%)

2051 of 3964 relevant lines covered (51.74%)

1.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/api/v1/lib/executor/calls/calls.go
1
package calls
2

3
import (
4
        "github.com/mesos/mesos-go/api/v1/lib"
5
        "github.com/mesos/mesos-go/api/v1/lib/executor"
6
)
7

8
// Framework sets a executor.Call's FrameworkID
9
func Framework(id string) executor.CallOpt {
×
10
        return func(c *executor.Call) {
×
11
                c.FrameworkID = mesos.FrameworkID{Value: id}
×
12
        }
×
13
}
14

15
// Executor sets a executor.Call's ExecutorID
16
func Executor(id string) executor.CallOpt {
×
17
        return func(c *executor.Call) {
×
18
                c.ExecutorID = mesos.ExecutorID{Value: id}
×
19
        }
×
20
}
21

22
// Subscribe returns an executor call with the given parameters.
23
func Subscribe(unackdTasks []mesos.TaskInfo, unackdUpdates []executor.Call_Update) *executor.Call {
×
24
        return &executor.Call{
×
25
                Type: executor.Call_SUBSCRIBE.Enum(),
×
26
                Subscribe: &executor.Call_Subscribe{
×
27
                        UnacknowledgedTasks:   unackdTasks,
×
28
                        UnacknowledgedUpdates: unackdUpdates,
×
29
                },
×
30
        }
×
31
}
×
32

33
// Update returns an executor call with the given parameters.
34
func Update(status mesos.TaskStatus) *executor.Call {
×
35
        return &executor.Call{
×
36
                Type: executor.Call_UPDATE.Enum(),
×
37
                Update: &executor.Call_Update{
×
38
                        Status: status,
×
39
                },
×
40
        }
×
41
}
×
42

43
// Message returns an executor call with the given parameters.
44
func Message(data []byte) *executor.Call {
×
45
        return &executor.Call{
×
46
                Type: executor.Call_MESSAGE.Enum(),
×
47
                Message: &executor.Call_Message{
×
48
                        Data: data,
×
49
                },
×
50
        }
×
51
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2024 Coveralls, Inc