id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
27,400
flynn/flynn
discoverd/main.go
openStore
func (m *Main) openStore() error { // If the advertised address is not in the peer list then we should proxy. // Resolve advertised address. addr, err := net.ResolveTCPAddr("tcp", m.advertiseAddr) if err != nil { return err } // Listen via mux storeLn := m.mux.Listen([]byte{server.StoreHdr}) // Initialize ...
go
func (m *Main) openStore() error { // If the advertised address is not in the peer list then we should proxy. // Resolve advertised address. addr, err := net.ResolveTCPAddr("tcp", m.advertiseAddr) if err != nil { return err } // Listen via mux storeLn := m.mux.Listen([]byte{server.StoreHdr}) // Initialize ...
[ "func", "(", "m", "*", "Main", ")", "openStore", "(", ")", "error", "{", "// If the advertised address is not in the peer list then we should proxy.", "// Resolve advertised address.", "addr", ",", "err", ":=", "net", ".", "ResolveTCPAddr", "(", "\"", "\"", ",", "m", ...
// openStore initializes and opens the store.
[ "openStore", "initializes", "and", "opens", "the", "store", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/main.go#L431-L465
27,401
flynn/flynn
discoverd/main.go
openDNSServer
func (m *Main) openDNSServer(addr string, recursors []string) error { s := &server.DNSServer{ UDPAddr: addr, TCPAddr: addr, Recursors: recursors, } // If store is available then attach it. Otherwise use a proxy. if m.store != nil { s.SetStore(m.store) } else { s.SetStore(&server.ProxyStore{Peers: m....
go
func (m *Main) openDNSServer(addr string, recursors []string) error { s := &server.DNSServer{ UDPAddr: addr, TCPAddr: addr, Recursors: recursors, } // If store is available then attach it. Otherwise use a proxy. if m.store != nil { s.SetStore(m.store) } else { s.SetStore(&server.ProxyStore{Peers: m....
[ "func", "(", "m", "*", "Main", ")", "openDNSServer", "(", "addr", "string", ",", "recursors", "[", "]", "string", ")", "error", "{", "s", ":=", "&", "server", ".", "DNSServer", "{", "UDPAddr", ":", "addr", ",", "TCPAddr", ":", "addr", ",", "Recursors...
// openDNSServer initializes and opens the DNS server. // The store must already be open.
[ "openDNSServer", "initializes", "and", "opens", "the", "DNS", "server", ".", "The", "store", "must", "already", "be", "open", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/main.go#L469-L488
27,402
flynn/flynn
discoverd/main.go
openHTTPServer
func (m *Main) openHTTPServer() error { h := server.NewHandler(false, m.peers) h.Main = m h.Peers = m.peers // If we have no store then start the handler in proxy mode if m.store == nil { h.Proxy.Store(true) } else { h.Store = m.store } m.handler = h m.httpServer = &http.Server{Handler: h} // Create list...
go
func (m *Main) openHTTPServer() error { h := server.NewHandler(false, m.peers) h.Main = m h.Peers = m.peers // If we have no store then start the handler in proxy mode if m.store == nil { h.Proxy.Store(true) } else { h.Store = m.store } m.handler = h m.httpServer = &http.Server{Handler: h} // Create list...
[ "func", "(", "m", "*", "Main", ")", "openHTTPServer", "(", ")", "error", "{", "h", ":=", "server", ".", "NewHandler", "(", "false", ",", "m", ".", "peers", ")", "\n", "h", ".", "Main", "=", "m", "\n", "h", ".", "Peers", "=", "m", ".", "peers", ...
// openHTTPServer initializes and opens the HTTP server. // The store must already be open.
[ "openHTTPServer", "initializes", "and", "opens", "the", "HTTP", "server", ".", "The", "store", "must", "already", "be", "open", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/main.go#L492-L510
27,403
flynn/flynn
discoverd/main.go
Notify
func (m *Main) Notify(notifyURL, dnsAddr string) { m.mu.Lock() m.status.URL = strings.Join(m.peers, ",") if dnsAddr != "" { m.status.DNS = dnsAddr } payload, _ := json.Marshal(m.status) m.mu.Unlock() res, err := http.Post(notifyURL, "application/json", bytes.NewReader(payload)) if err != nil { m.logger.Pri...
go
func (m *Main) Notify(notifyURL, dnsAddr string) { m.mu.Lock() m.status.URL = strings.Join(m.peers, ",") if dnsAddr != "" { m.status.DNS = dnsAddr } payload, _ := json.Marshal(m.status) m.mu.Unlock() res, err := http.Post(notifyURL, "application/json", bytes.NewReader(payload)) if err != nil { m.logger.Pri...
[ "func", "(", "m", "*", "Main", ")", "Notify", "(", "notifyURL", ",", "dnsAddr", "string", ")", "{", "m", ".", "mu", ".", "Lock", "(", ")", "\n", "m", ".", "status", ".", "URL", "=", "strings", ".", "Join", "(", "m", ".", "peers", ",", "\"", "...
// Notify sends a POST to notifyURL to let it know that addr is accessible.
[ "Notify", "sends", "a", "POST", "to", "notifyURL", "to", "let", "it", "know", "that", "addr", "is", "accessible", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/main.go#L513-L528
27,404
flynn/flynn
discoverd/main.go
MergeHostPort
func MergeHostPort(host, portAddr string) string { _, port, _ := net.SplitHostPort(portAddr) return net.JoinHostPort(host, port) }
go
func MergeHostPort(host, portAddr string) string { _, port, _ := net.SplitHostPort(portAddr) return net.JoinHostPort(host, port) }
[ "func", "MergeHostPort", "(", "host", ",", "portAddr", "string", ")", "string", "{", "_", ",", "port", ",", "_", ":=", "net", ".", "SplitHostPort", "(", "portAddr", ")", "\n", "return", "net", ".", "JoinHostPort", "(", "host", ",", "port", ")", "\n", ...
// MergeHostPort joins host to the port in portAddr.
[ "MergeHostPort", "joins", "host", "to", "the", "port", "in", "portAddr", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/main.go#L531-L534
27,405
flynn/flynn
discoverd/main.go
waitForLeader
func (m *Main) waitForLeader(timeout time.Duration) error { // Ignore leadership if we are a proxy. if m.store == nil { return nil } var timeoutCh <-chan time.Time if timeout != IndefiniteTimeout { timeoutCh = time.After(timeout) } for { select { case <-timeoutCh: return errors.New("timed out waiting ...
go
func (m *Main) waitForLeader(timeout time.Duration) error { // Ignore leadership if we are a proxy. if m.store == nil { return nil } var timeoutCh <-chan time.Time if timeout != IndefiniteTimeout { timeoutCh = time.After(timeout) } for { select { case <-timeoutCh: return errors.New("timed out waiting ...
[ "func", "(", "m", "*", "Main", ")", "waitForLeader", "(", "timeout", "time", ".", "Duration", ")", "error", "{", "// Ignore leadership if we are a proxy.", "if", "m", ".", "store", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "var", "timeoutCh", "<-...
// waitForLeader polls the store until a leader is found or a timeout occurs. // If timeout is -1 then wait indefinitely
[ "waitForLeader", "polls", "the", "store", "until", "a", "leader", "is", "found", "or", "a", "timeout", "occurs", ".", "If", "timeout", "is", "-", "1", "then", "wait", "indefinitely" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/main.go#L538-L557
27,406
flynn/flynn
discoverd/main.go
TrimSpaceSlice
func TrimSpaceSlice(a []string) []string { other := make([]string, 0, len(a)) for _, s := range a { s = strings.TrimSpace(s) if s == "" { continue } other = append(other, s) } return other }
go
func TrimSpaceSlice(a []string) []string { other := make([]string, 0, len(a)) for _, s := range a { s = strings.TrimSpace(s) if s == "" { continue } other = append(other, s) } return other }
[ "func", "TrimSpaceSlice", "(", "a", "[", "]", "string", ")", "[", "]", "string", "{", "other", ":=", "make", "(", "[", "]", "string", ",", "0", ",", "len", "(", "a", ")", ")", "\n", "for", "_", ",", "s", ":=", "range", "a", "{", "s", "=", "...
// TrimSpaceSlice returns a new slice of trimmed strings. // Empty strings are removed entirely.
[ "TrimSpaceSlice", "returns", "a", "new", "slice", "of", "trimmed", "strings", ".", "Empty", "strings", "are", "removed", "entirely", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/main.go#L612-L622
27,407
flynn/flynn
discoverd/main.go
SetPortSlice
func SetPortSlice(peers []string, addr string) ([]string, error) { // Retrieve the port from addr. _, port, err := net.SplitHostPort(addr) if err != nil { return nil, err } // Merge the port with the peer hosts into a new slice. other := make([]string, len(peers)) for i, peer := range peers { host, _, err :...
go
func SetPortSlice(peers []string, addr string) ([]string, error) { // Retrieve the port from addr. _, port, err := net.SplitHostPort(addr) if err != nil { return nil, err } // Merge the port with the peer hosts into a new slice. other := make([]string, len(peers)) for i, peer := range peers { host, _, err :...
[ "func", "SetPortSlice", "(", "peers", "[", "]", "string", ",", "addr", "string", ")", "(", "[", "]", "string", ",", "error", ")", "{", "// Retrieve the port from addr.", "_", ",", "port", ",", "err", ":=", "net", ".", "SplitHostPort", "(", "addr", ")", ...
// SetPortSlice sets the ports for a slice of hosts.
[ "SetPortSlice", "sets", "the", "ports", "for", "a", "slice", "of", "hosts", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/main.go#L625-L644
27,408
flynn/flynn
controller/client/v1/client.go
GetCACert
func (c *Client) GetCACert() ([]byte, error) { var cert bytes.Buffer res, err := c.RawReq("GET", "/ca-cert", nil, nil, nil) if err != nil { return nil, err } defer res.Body.Close() if _, err := io.Copy(&cert, res.Body); err != nil { return nil, err } return cert.Bytes(), nil }
go
func (c *Client) GetCACert() ([]byte, error) { var cert bytes.Buffer res, err := c.RawReq("GET", "/ca-cert", nil, nil, nil) if err != nil { return nil, err } defer res.Body.Close() if _, err := io.Copy(&cert, res.Body); err != nil { return nil, err } return cert.Bytes(), nil }
[ "func", "(", "c", "*", "Client", ")", "GetCACert", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "var", "cert", "bytes", ".", "Buffer", "\n", "res", ",", "err", ":=", "c", ".", "RawReq", "(", "\"", "\"", ",", "\"", "\"", ",", "nil"...
// GetCACert returns the CA cert for the controller
[ "GetCACert", "returns", "the", "CA", "cert", "for", "the", "controller" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L112-L123
27,409
flynn/flynn
controller/client/v1/client.go
PutDomain
func (c *Client) PutDomain(dm *ct.DomainMigration) error { if dm.Domain == "" { return errors.New("controller: missing domain") } if dm.OldDomain == "" { return errors.New("controller: missing old domain") } return c.Put("/domain", dm, dm) }
go
func (c *Client) PutDomain(dm *ct.DomainMigration) error { if dm.Domain == "" { return errors.New("controller: missing domain") } if dm.OldDomain == "" { return errors.New("controller: missing old domain") } return c.Put("/domain", dm, dm) }
[ "func", "(", "c", "*", "Client", ")", "PutDomain", "(", "dm", "*", "ct", ".", "DomainMigration", ")", "error", "{", "if", "dm", ".", "Domain", "==", "\"", "\"", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "if", "...
// PutDomain migrates the cluster domain
[ "PutDomain", "migrates", "the", "cluster", "domain" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L137-L145
27,410
flynn/flynn
controller/client/v1/client.go
CreateArtifact
func (c *Client) CreateArtifact(artifact *ct.Artifact) error { return c.Post("/artifacts", artifact, artifact) }
go
func (c *Client) CreateArtifact(artifact *ct.Artifact) error { return c.Post("/artifacts", artifact, artifact) }
[ "func", "(", "c", "*", "Client", ")", "CreateArtifact", "(", "artifact", "*", "ct", ".", "Artifact", ")", "error", "{", "return", "c", ".", "Post", "(", "\"", "\"", ",", "artifact", ",", "artifact", ")", "\n", "}" ]
// CreateArtifact creates a new artifact.
[ "CreateArtifact", "creates", "a", "new", "artifact", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L148-L150
27,411
flynn/flynn
controller/client/v1/client.go
CreateRelease
func (c *Client) CreateRelease(appID string, release *ct.Release) error { release.AppID = appID return c.Post("/releases", release, release) }
go
func (c *Client) CreateRelease(appID string, release *ct.Release) error { release.AppID = appID return c.Post("/releases", release, release) }
[ "func", "(", "c", "*", "Client", ")", "CreateRelease", "(", "appID", "string", ",", "release", "*", "ct", ".", "Release", ")", "error", "{", "release", ".", "AppID", "=", "appID", "\n", "return", "c", ".", "Post", "(", "\"", "\"", ",", "release", "...
// CreateRelease creates a new release.
[ "CreateRelease", "creates", "a", "new", "release", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L153-L156
27,412
flynn/flynn
controller/client/v1/client.go
CreateApp
func (c *Client) CreateApp(app *ct.App) error { return c.Post("/apps", app, app) }
go
func (c *Client) CreateApp(app *ct.App) error { return c.Post("/apps", app, app) }
[ "func", "(", "c", "*", "Client", ")", "CreateApp", "(", "app", "*", "ct", ".", "App", ")", "error", "{", "return", "c", ".", "Post", "(", "\"", "\"", ",", "app", ",", "app", ")", "\n", "}" ]
// CreateApp creates a new app.
[ "CreateApp", "creates", "a", "new", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L159-L161
27,413
flynn/flynn
controller/client/v1/client.go
UpdateApp
func (c *Client) UpdateApp(app *ct.App) error { if app.ID == "" { return errors.New("controller: missing id") } return c.Post(fmt.Sprintf("/apps/%s", app.ID), app, app) }
go
func (c *Client) UpdateApp(app *ct.App) error { if app.ID == "" { return errors.New("controller: missing id") } return c.Post(fmt.Sprintf("/apps/%s", app.ID), app, app) }
[ "func", "(", "c", "*", "Client", ")", "UpdateApp", "(", "app", "*", "ct", ".", "App", ")", "error", "{", "if", "app", ".", "ID", "==", "\"", "\"", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "return", "c", ".",...
// UpdateApp updates the meta and strategy using app.ID.
[ "UpdateApp", "updates", "the", "meta", "and", "strategy", "using", "app", ".", "ID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L164-L169
27,414
flynn/flynn
controller/client/v1/client.go
DeleteApp
func (c *Client) DeleteApp(appID string) (*ct.AppDeletion, error) { events := make(chan *ct.Event) stream, err := c.StreamEvents(ct.StreamEventsOptions{ AppID: appID, ObjectTypes: []ct.EventType{ct.EventTypeAppDeletion}, }, events) if err != nil { return nil, err } defer stream.Close() if err := c.D...
go
func (c *Client) DeleteApp(appID string) (*ct.AppDeletion, error) { events := make(chan *ct.Event) stream, err := c.StreamEvents(ct.StreamEventsOptions{ AppID: appID, ObjectTypes: []ct.EventType{ct.EventTypeAppDeletion}, }, events) if err != nil { return nil, err } defer stream.Close() if err := c.D...
[ "func", "(", "c", "*", "Client", ")", "DeleteApp", "(", "appID", "string", ")", "(", "*", "ct", ".", "AppDeletion", ",", "error", ")", "{", "events", ":=", "make", "(", "chan", "*", "ct", ".", "Event", ")", "\n", "stream", ",", "err", ":=", "c", ...
// DeleteApp deletes an app.
[ "DeleteApp", "deletes", "an", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L180-L211
27,415
flynn/flynn
controller/client/v1/client.go
CreateProvider
func (c *Client) CreateProvider(provider *ct.Provider) error { return c.Post("/providers", provider, provider) }
go
func (c *Client) CreateProvider(provider *ct.Provider) error { return c.Post("/providers", provider, provider) }
[ "func", "(", "c", "*", "Client", ")", "CreateProvider", "(", "provider", "*", "ct", ".", "Provider", ")", "error", "{", "return", "c", ".", "Post", "(", "\"", "\"", ",", "provider", ",", "provider", ")", "\n", "}" ]
// CreateProvider creates a new provider.
[ "CreateProvider", "creates", "a", "new", "provider", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L214-L216
27,416
flynn/flynn
controller/client/v1/client.go
GetProvider
func (c *Client) GetProvider(providerID string) (*ct.Provider, error) { provider := &ct.Provider{} return provider, c.Get(fmt.Sprintf("/providers/%s", providerID), provider) }
go
func (c *Client) GetProvider(providerID string) (*ct.Provider, error) { provider := &ct.Provider{} return provider, c.Get(fmt.Sprintf("/providers/%s", providerID), provider) }
[ "func", "(", "c", "*", "Client", ")", "GetProvider", "(", "providerID", "string", ")", "(", "*", "ct", ".", "Provider", ",", "error", ")", "{", "provider", ":=", "&", "ct", ".", "Provider", "{", "}", "\n", "return", "provider", ",", "c", ".", "Get"...
// GetProvider returns the provider identified by providerID.
[ "GetProvider", "returns", "the", "provider", "identified", "by", "providerID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L219-L222
27,417
flynn/flynn
controller/client/v1/client.go
ProvisionResource
func (c *Client) ProvisionResource(req *ct.ResourceReq) (*ct.Resource, error) { if req.ProviderID == "" { return nil, errors.New("controller: missing provider id") } res := &ct.Resource{} err := c.Post(fmt.Sprintf("/providers/%s/resources", req.ProviderID), req, res) return res, err }
go
func (c *Client) ProvisionResource(req *ct.ResourceReq) (*ct.Resource, error) { if req.ProviderID == "" { return nil, errors.New("controller: missing provider id") } res := &ct.Resource{} err := c.Post(fmt.Sprintf("/providers/%s/resources", req.ProviderID), req, res) return res, err }
[ "func", "(", "c", "*", "Client", ")", "ProvisionResource", "(", "req", "*", "ct", ".", "ResourceReq", ")", "(", "*", "ct", ".", "Resource", ",", "error", ")", "{", "if", "req", ".", "ProviderID", "==", "\"", "\"", "{", "return", "nil", ",", "errors...
// ProvisionResource uses a provider to provision a new resource for the // application. Returns details about the resource.
[ "ProvisionResource", "uses", "a", "provider", "to", "provision", "a", "new", "resource", "for", "the", "application", ".", "Returns", "details", "about", "the", "resource", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L226-L233
27,418
flynn/flynn
controller/client/v1/client.go
GetResource
func (c *Client) GetResource(providerID, resourceID string) (*ct.Resource, error) { res := &ct.Resource{} err := c.Get(fmt.Sprintf("/providers/%s/resources/%s", providerID, resourceID), res) return res, err }
go
func (c *Client) GetResource(providerID, resourceID string) (*ct.Resource, error) { res := &ct.Resource{} err := c.Get(fmt.Sprintf("/providers/%s/resources/%s", providerID, resourceID), res) return res, err }
[ "func", "(", "c", "*", "Client", ")", "GetResource", "(", "providerID", ",", "resourceID", "string", ")", "(", "*", "ct", ".", "Resource", ",", "error", ")", "{", "res", ":=", "&", "ct", ".", "Resource", "{", "}", "\n", "err", ":=", "c", ".", "Ge...
// GetResource returns the resource identified by resourceID under providerID.
[ "GetResource", "returns", "the", "resource", "identified", "by", "resourceID", "under", "providerID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L236-L240
27,419
flynn/flynn
controller/client/v1/client.go
ResourceListAll
func (c *Client) ResourceListAll() ([]*ct.Resource, error) { var resources []*ct.Resource return resources, c.Get("/resources", &resources) }
go
func (c *Client) ResourceListAll() ([]*ct.Resource, error) { var resources []*ct.Resource return resources, c.Get("/resources", &resources) }
[ "func", "(", "c", "*", "Client", ")", "ResourceListAll", "(", ")", "(", "[", "]", "*", "ct", ".", "Resource", ",", "error", ")", "{", "var", "resources", "[", "]", "*", "ct", ".", "Resource", "\n", "return", "resources", ",", "c", ".", "Get", "("...
// ResourceListAll returns all resources.
[ "ResourceListAll", "returns", "all", "resources", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L243-L246
27,420
flynn/flynn
controller/client/v1/client.go
ResourceList
func (c *Client) ResourceList(providerID string) ([]*ct.Resource, error) { var resources []*ct.Resource return resources, c.Get(fmt.Sprintf("/providers/%s/resources", providerID), &resources) }
go
func (c *Client) ResourceList(providerID string) ([]*ct.Resource, error) { var resources []*ct.Resource return resources, c.Get(fmt.Sprintf("/providers/%s/resources", providerID), &resources) }
[ "func", "(", "c", "*", "Client", ")", "ResourceList", "(", "providerID", "string", ")", "(", "[", "]", "*", "ct", ".", "Resource", ",", "error", ")", "{", "var", "resources", "[", "]", "*", "ct", ".", "Resource", "\n", "return", "resources", ",", "...
// ResourceList returns all resources under providerID.
[ "ResourceList", "returns", "all", "resources", "under", "providerID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L249-L252
27,421
flynn/flynn
controller/client/v1/client.go
AddResourceApp
func (c *Client) AddResourceApp(providerID, resourceID, appID string) (*ct.Resource, error) { var resource *ct.Resource return resource, c.Put(fmt.Sprintf("/providers/%s/resources/%s/apps/%s", providerID, resourceID, appID), nil, &resource) }
go
func (c *Client) AddResourceApp(providerID, resourceID, appID string) (*ct.Resource, error) { var resource *ct.Resource return resource, c.Put(fmt.Sprintf("/providers/%s/resources/%s/apps/%s", providerID, resourceID, appID), nil, &resource) }
[ "func", "(", "c", "*", "Client", ")", "AddResourceApp", "(", "providerID", ",", "resourceID", ",", "appID", "string", ")", "(", "*", "ct", ".", "Resource", ",", "error", ")", "{", "var", "resource", "*", "ct", ".", "Resource", "\n", "return", "resource...
// AddResourceApp adds appID to the resource identified by resourceID and returns the resource
[ "AddResourceApp", "adds", "appID", "to", "the", "resource", "identified", "by", "resourceID", "and", "returns", "the", "resource" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L255-L258
27,422
flynn/flynn
controller/client/v1/client.go
DeleteResourceApp
func (c *Client) DeleteResourceApp(providerID, resourceID, appID string) (*ct.Resource, error) { var resource *ct.Resource return resource, c.Delete(fmt.Sprintf("/providers/%s/resources/%s/apps/%s", providerID, resourceID, appID), &resource) }
go
func (c *Client) DeleteResourceApp(providerID, resourceID, appID string) (*ct.Resource, error) { var resource *ct.Resource return resource, c.Delete(fmt.Sprintf("/providers/%s/resources/%s/apps/%s", providerID, resourceID, appID), &resource) }
[ "func", "(", "c", "*", "Client", ")", "DeleteResourceApp", "(", "providerID", ",", "resourceID", ",", "appID", "string", ")", "(", "*", "ct", ".", "Resource", ",", "error", ")", "{", "var", "resource", "*", "ct", ".", "Resource", "\n", "return", "resou...
// DeleteResourceApp removes appID from the resource identified by resourceID and returns the resource
[ "DeleteResourceApp", "removes", "appID", "from", "the", "resource", "identified", "by", "resourceID", "and", "returns", "the", "resource" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L261-L264
27,423
flynn/flynn
controller/client/v1/client.go
AppResourceList
func (c *Client) AppResourceList(appID string) ([]*ct.Resource, error) { var resources []*ct.Resource return resources, c.Get(fmt.Sprintf("/apps/%s/resources", appID), &resources) }
go
func (c *Client) AppResourceList(appID string) ([]*ct.Resource, error) { var resources []*ct.Resource return resources, c.Get(fmt.Sprintf("/apps/%s/resources", appID), &resources) }
[ "func", "(", "c", "*", "Client", ")", "AppResourceList", "(", "appID", "string", ")", "(", "[", "]", "*", "ct", ".", "Resource", ",", "error", ")", "{", "var", "resources", "[", "]", "*", "ct", ".", "Resource", "\n", "return", "resources", ",", "c"...
// AppResourceList returns a list of all resources under appID.
[ "AppResourceList", "returns", "a", "list", "of", "all", "resources", "under", "appID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L267-L270
27,424
flynn/flynn
controller/client/v1/client.go
PutResource
func (c *Client) PutResource(resource *ct.Resource) error { if resource.ID == "" || resource.ProviderID == "" { return errors.New("controller: missing id and/or provider id") } return c.Put(fmt.Sprintf("/providers/%s/resources/%s", resource.ProviderID, resource.ID), resource, resource) }
go
func (c *Client) PutResource(resource *ct.Resource) error { if resource.ID == "" || resource.ProviderID == "" { return errors.New("controller: missing id and/or provider id") } return c.Put(fmt.Sprintf("/providers/%s/resources/%s", resource.ProviderID, resource.ID), resource, resource) }
[ "func", "(", "c", "*", "Client", ")", "PutResource", "(", "resource", "*", "ct", ".", "Resource", ")", "error", "{", "if", "resource", ".", "ID", "==", "\"", "\"", "||", "resource", ".", "ProviderID", "==", "\"", "\"", "{", "return", "errors", ".", ...
// PutResource updates a resource.
[ "PutResource", "updates", "a", "resource", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L273-L278
27,425
flynn/flynn
controller/client/v1/client.go
DeleteResource
func (c *Client) DeleteResource(providerID, resourceID string) (*ct.Resource, error) { res := &ct.Resource{} err := c.Delete(fmt.Sprintf("/providers/%s/resources/%s", providerID, resourceID), res) return res, err }
go
func (c *Client) DeleteResource(providerID, resourceID string) (*ct.Resource, error) { res := &ct.Resource{} err := c.Delete(fmt.Sprintf("/providers/%s/resources/%s", providerID, resourceID), res) return res, err }
[ "func", "(", "c", "*", "Client", ")", "DeleteResource", "(", "providerID", ",", "resourceID", "string", ")", "(", "*", "ct", ".", "Resource", ",", "error", ")", "{", "res", ":=", "&", "ct", ".", "Resource", "{", "}", "\n", "err", ":=", "c", ".", ...
// DeleteResource deprovisions and deletes the resource identified by resourceID under providerID.
[ "DeleteResource", "deprovisions", "and", "deletes", "the", "resource", "identified", "by", "resourceID", "under", "providerID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L281-L285
27,426
flynn/flynn
controller/client/v1/client.go
PutFormation
func (c *Client) PutFormation(formation *ct.Formation) error { if formation.AppID == "" || formation.ReleaseID == "" { return errors.New("controller: missing app id and/or release id") } return c.Put(fmt.Sprintf("/apps/%s/formations/%s", formation.AppID, formation.ReleaseID), formation, formation) }
go
func (c *Client) PutFormation(formation *ct.Formation) error { if formation.AppID == "" || formation.ReleaseID == "" { return errors.New("controller: missing app id and/or release id") } return c.Put(fmt.Sprintf("/apps/%s/formations/%s", formation.AppID, formation.ReleaseID), formation, formation) }
[ "func", "(", "c", "*", "Client", ")", "PutFormation", "(", "formation", "*", "ct", ".", "Formation", ")", "error", "{", "if", "formation", ".", "AppID", "==", "\"", "\"", "||", "formation", ".", "ReleaseID", "==", "\"", "\"", "{", "return", "errors", ...
// PutFormation updates an existing formation.
[ "PutFormation", "updates", "an", "existing", "formation", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L389-L394
27,427
flynn/flynn
controller/client/v1/client.go
PutJob
func (c *Client) PutJob(job *ct.Job) error { if job.UUID == "" || job.AppID == "" { return errors.New("controller: missing job uuid and/or app id") } return c.Put(fmt.Sprintf("/apps/%s/jobs/%s", job.AppID, job.UUID), job, job) }
go
func (c *Client) PutJob(job *ct.Job) error { if job.UUID == "" || job.AppID == "" { return errors.New("controller: missing job uuid and/or app id") } return c.Put(fmt.Sprintf("/apps/%s/jobs/%s", job.AppID, job.UUID), job, job) }
[ "func", "(", "c", "*", "Client", ")", "PutJob", "(", "job", "*", "ct", ".", "Job", ")", "error", "{", "if", "job", ".", "UUID", "==", "\"", "\"", "||", "job", ".", "AppID", "==", "\"", "\"", "{", "return", "errors", ".", "New", "(", "\"", "\"...
// PutJob updates an existing job.
[ "PutJob", "updates", "an", "existing", "job", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L397-L402
27,428
flynn/flynn
controller/client/v1/client.go
DeleteJob
func (c *Client) DeleteJob(appID, jobID string) error { return c.Delete(fmt.Sprintf("/apps/%s/jobs/%s", appID, jobID), nil) }
go
func (c *Client) DeleteJob(appID, jobID string) error { return c.Delete(fmt.Sprintf("/apps/%s/jobs/%s", appID, jobID), nil) }
[ "func", "(", "c", "*", "Client", ")", "DeleteJob", "(", "appID", ",", "jobID", "string", ")", "error", "{", "return", "c", ".", "Delete", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "appID", ",", "jobID", ")", ",", "nil", ")", "\n", "}" ]
// DeleteJob kills a specific job id under the specified app.
[ "DeleteJob", "kills", "a", "specific", "job", "id", "under", "the", "specified", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L405-L407
27,429
flynn/flynn
controller/client/v1/client.go
SetAppRelease
func (c *Client) SetAppRelease(appID, releaseID string) error { return c.Put(fmt.Sprintf("/apps/%s/release", appID), &ct.Release{ID: releaseID}, nil) }
go
func (c *Client) SetAppRelease(appID, releaseID string) error { return c.Put(fmt.Sprintf("/apps/%s/release", appID), &ct.Release{ID: releaseID}, nil) }
[ "func", "(", "c", "*", "Client", ")", "SetAppRelease", "(", "appID", ",", "releaseID", "string", ")", "error", "{", "return", "c", ".", "Put", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "appID", ")", ",", "&", "ct", ".", "Release", "{", "I...
// SetAppRelease sets the specified release as the current release for an app.
[ "SetAppRelease", "sets", "the", "specified", "release", "as", "the", "current", "release", "for", "an", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L410-L412
27,430
flynn/flynn
controller/client/v1/client.go
GetAppRelease
func (c *Client) GetAppRelease(appID string) (*ct.Release, error) { release := &ct.Release{} return release, c.Get(fmt.Sprintf("/apps/%s/release", appID), release) }
go
func (c *Client) GetAppRelease(appID string) (*ct.Release, error) { release := &ct.Release{} return release, c.Get(fmt.Sprintf("/apps/%s/release", appID), release) }
[ "func", "(", "c", "*", "Client", ")", "GetAppRelease", "(", "appID", "string", ")", "(", "*", "ct", ".", "Release", ",", "error", ")", "{", "release", ":=", "&", "ct", ".", "Release", "{", "}", "\n", "return", "release", ",", "c", ".", "Get", "("...
// GetAppRelease returns the current release of an app.
[ "GetAppRelease", "returns", "the", "current", "release", "of", "an", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L415-L418
27,431
flynn/flynn
controller/client/v1/client.go
RouteList
func (c *Client) RouteList(appID string) ([]*router.Route, error) { var routes []*router.Route return routes, c.Get(fmt.Sprintf("/apps/%s/routes", appID), &routes) }
go
func (c *Client) RouteList(appID string) ([]*router.Route, error) { var routes []*router.Route return routes, c.Get(fmt.Sprintf("/apps/%s/routes", appID), &routes) }
[ "func", "(", "c", "*", "Client", ")", "RouteList", "(", "appID", "string", ")", "(", "[", "]", "*", "router", ".", "Route", ",", "error", ")", "{", "var", "routes", "[", "]", "*", "router", ".", "Route", "\n", "return", "routes", ",", "c", ".", ...
// RouteList returns all routes for an app.
[ "RouteList", "returns", "all", "routes", "for", "an", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L421-L424
27,432
flynn/flynn
controller/client/v1/client.go
GetRoute
func (c *Client) GetRoute(appID string, routeID string) (*router.Route, error) { route := &router.Route{} return route, c.Get(fmt.Sprintf("/apps/%s/routes/%s", appID, routeID), route) }
go
func (c *Client) GetRoute(appID string, routeID string) (*router.Route, error) { route := &router.Route{} return route, c.Get(fmt.Sprintf("/apps/%s/routes/%s", appID, routeID), route) }
[ "func", "(", "c", "*", "Client", ")", "GetRoute", "(", "appID", "string", ",", "routeID", "string", ")", "(", "*", "router", ".", "Route", ",", "error", ")", "{", "route", ":=", "&", "router", ".", "Route", "{", "}", "\n", "return", "route", ",", ...
// GetRoute returns details for the routeID under the specified app.
[ "GetRoute", "returns", "details", "for", "the", "routeID", "under", "the", "specified", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L427-L430
27,433
flynn/flynn
controller/client/v1/client.go
CreateRoute
func (c *Client) CreateRoute(appID string, route *router.Route) error { return c.Post(fmt.Sprintf("/apps/%s/routes", appID), route, route) }
go
func (c *Client) CreateRoute(appID string, route *router.Route) error { return c.Post(fmt.Sprintf("/apps/%s/routes", appID), route, route) }
[ "func", "(", "c", "*", "Client", ")", "CreateRoute", "(", "appID", "string", ",", "route", "*", "router", ".", "Route", ")", "error", "{", "return", "c", ".", "Post", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "appID", ")", ",", "route", "...
// CreateRoute creates a new route for the specified app.
[ "CreateRoute", "creates", "a", "new", "route", "for", "the", "specified", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L433-L435
27,434
flynn/flynn
controller/client/v1/client.go
UpdateRoute
func (c *Client) UpdateRoute(appID string, routeID string, route *router.Route) error { return c.Put(fmt.Sprintf("/apps/%s/routes/%s", appID, routeID), route, route) }
go
func (c *Client) UpdateRoute(appID string, routeID string, route *router.Route) error { return c.Put(fmt.Sprintf("/apps/%s/routes/%s", appID, routeID), route, route) }
[ "func", "(", "c", "*", "Client", ")", "UpdateRoute", "(", "appID", "string", ",", "routeID", "string", ",", "route", "*", "router", ".", "Route", ")", "error", "{", "return", "c", ".", "Put", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "appID...
// UpdateRoute updates details for the routeID under the specified app.
[ "UpdateRoute", "updates", "details", "for", "the", "routeID", "under", "the", "specified", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L438-L440
27,435
flynn/flynn
controller/client/v1/client.go
DeleteRoute
func (c *Client) DeleteRoute(appID string, routeID string) error { return c.Delete(fmt.Sprintf("/apps/%s/routes/%s", appID, routeID), nil) }
go
func (c *Client) DeleteRoute(appID string, routeID string) error { return c.Delete(fmt.Sprintf("/apps/%s/routes/%s", appID, routeID), nil) }
[ "func", "(", "c", "*", "Client", ")", "DeleteRoute", "(", "appID", "string", ",", "routeID", "string", ")", "error", "{", "return", "c", ".", "Delete", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "appID", ",", "routeID", ")", ",", "nil", ")",...
// DeleteRoute deletes a route under the specified app.
[ "DeleteRoute", "deletes", "a", "route", "under", "the", "specified", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L443-L445
27,436
flynn/flynn
controller/client/v1/client.go
GetFormation
func (c *Client) GetFormation(appID, releaseID string) (*ct.Formation, error) { formation := &ct.Formation{} return formation, c.Get(fmt.Sprintf("/apps/%s/formations/%s", appID, releaseID), formation) }
go
func (c *Client) GetFormation(appID, releaseID string) (*ct.Formation, error) { formation := &ct.Formation{} return formation, c.Get(fmt.Sprintf("/apps/%s/formations/%s", appID, releaseID), formation) }
[ "func", "(", "c", "*", "Client", ")", "GetFormation", "(", "appID", ",", "releaseID", "string", ")", "(", "*", "ct", ".", "Formation", ",", "error", ")", "{", "formation", ":=", "&", "ct", ".", "Formation", "{", "}", "\n", "return", "formation", ",",...
// GetFormation returns details for the specified formation under app and // release.
[ "GetFormation", "returns", "details", "for", "the", "specified", "formation", "under", "app", "and", "release", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L449-L452
27,437
flynn/flynn
controller/client/v1/client.go
GetExpandedFormation
func (c *Client) GetExpandedFormation(appID, releaseID string) (*ct.ExpandedFormation, error) { formation := &ct.ExpandedFormation{} return formation, c.Get(fmt.Sprintf("/apps/%s/formations/%s?expand=true", appID, releaseID), formation) }
go
func (c *Client) GetExpandedFormation(appID, releaseID string) (*ct.ExpandedFormation, error) { formation := &ct.ExpandedFormation{} return formation, c.Get(fmt.Sprintf("/apps/%s/formations/%s?expand=true", appID, releaseID), formation) }
[ "func", "(", "c", "*", "Client", ")", "GetExpandedFormation", "(", "appID", ",", "releaseID", "string", ")", "(", "*", "ct", ".", "ExpandedFormation", ",", "error", ")", "{", "formation", ":=", "&", "ct", ".", "ExpandedFormation", "{", "}", "\n", "return...
// GetExpandedFormation returns expanded details for the specified formation // under app and release.
[ "GetExpandedFormation", "returns", "expanded", "details", "for", "the", "specified", "formation", "under", "app", "and", "release", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L456-L459
27,438
flynn/flynn
controller/client/v1/client.go
FormationList
func (c *Client) FormationList(appID string) ([]*ct.Formation, error) { var formations []*ct.Formation return formations, c.Get(fmt.Sprintf("/apps/%s/formations", appID), &formations) }
go
func (c *Client) FormationList(appID string) ([]*ct.Formation, error) { var formations []*ct.Formation return formations, c.Get(fmt.Sprintf("/apps/%s/formations", appID), &formations) }
[ "func", "(", "c", "*", "Client", ")", "FormationList", "(", "appID", "string", ")", "(", "[", "]", "*", "ct", ".", "Formation", ",", "error", ")", "{", "var", "formations", "[", "]", "*", "ct", ".", "Formation", "\n", "return", "formations", ",", "...
// FormationList returns a list of all formations under appID.
[ "FormationList", "returns", "a", "list", "of", "all", "formations", "under", "appID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L462-L465
27,439
flynn/flynn
controller/client/v1/client.go
DeleteFormation
func (c *Client) DeleteFormation(appID, releaseID string) error { return c.Delete(fmt.Sprintf("/apps/%s/formations/%s", appID, releaseID), nil) }
go
func (c *Client) DeleteFormation(appID, releaseID string) error { return c.Delete(fmt.Sprintf("/apps/%s/formations/%s", appID, releaseID), nil) }
[ "func", "(", "c", "*", "Client", ")", "DeleteFormation", "(", "appID", ",", "releaseID", "string", ")", "error", "{", "return", "c", ".", "Delete", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "appID", ",", "releaseID", ")", ",", "nil", ")", "...
// DeleteFormation deletes the formation matching appID and releaseID.
[ "DeleteFormation", "deletes", "the", "formation", "matching", "appID", "and", "releaseID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L475-L477
27,440
flynn/flynn
controller/client/v1/client.go
GetRelease
func (c *Client) GetRelease(releaseID string) (*ct.Release, error) { release := &ct.Release{} return release, c.Get(fmt.Sprintf("/releases/%s", releaseID), release) }
go
func (c *Client) GetRelease(releaseID string) (*ct.Release, error) { release := &ct.Release{} return release, c.Get(fmt.Sprintf("/releases/%s", releaseID), release) }
[ "func", "(", "c", "*", "Client", ")", "GetRelease", "(", "releaseID", "string", ")", "(", "*", "ct", ".", "Release", ",", "error", ")", "{", "release", ":=", "&", "ct", ".", "Release", "{", "}", "\n", "return", "release", ",", "c", ".", "Get", "(...
// GetRelease returns details for the specified release.
[ "GetRelease", "returns", "details", "for", "the", "specified", "release", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L480-L483
27,441
flynn/flynn
controller/client/v1/client.go
GetArtifact
func (c *Client) GetArtifact(artifactID string) (*ct.Artifact, error) { artifact := &ct.Artifact{} return artifact, c.Get(fmt.Sprintf("/artifacts/%s", artifactID), artifact) }
go
func (c *Client) GetArtifact(artifactID string) (*ct.Artifact, error) { artifact := &ct.Artifact{} return artifact, c.Get(fmt.Sprintf("/artifacts/%s", artifactID), artifact) }
[ "func", "(", "c", "*", "Client", ")", "GetArtifact", "(", "artifactID", "string", ")", "(", "*", "ct", ".", "Artifact", ",", "error", ")", "{", "artifact", ":=", "&", "ct", ".", "Artifact", "{", "}", "\n", "return", "artifact", ",", "c", ".", "Get"...
// GetArtifact returns details for the specified artifact.
[ "GetArtifact", "returns", "details", "for", "the", "specified", "artifact", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L486-L489
27,442
flynn/flynn
controller/client/v1/client.go
GetApp
func (c *Client) GetApp(appID string) (*ct.App, error) { app := &ct.App{} return app, c.Get(fmt.Sprintf("/apps/%s", appID), app) }
go
func (c *Client) GetApp(appID string) (*ct.App, error) { app := &ct.App{} return app, c.Get(fmt.Sprintf("/apps/%s", appID), app) }
[ "func", "(", "c", "*", "Client", ")", "GetApp", "(", "appID", "string", ")", "(", "*", "ct", ".", "App", ",", "error", ")", "{", "app", ":=", "&", "ct", ".", "App", "{", "}", "\n", "return", "app", ",", "c", ".", "Get", "(", "fmt", ".", "Sp...
// GetApp returns details for the specified app.
[ "GetApp", "returns", "details", "for", "the", "specified", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L492-L495
27,443
flynn/flynn
controller/client/v1/client.go
GetAppLog
func (c *Client) GetAppLog(appID string, opts *logagg.LogOpts) (io.ReadCloser, error) { path := fmt.Sprintf("/apps/%s/log", appID) if opts != nil { if encodedQuery := opts.EncodedQuery(); encodedQuery != "" { path = fmt.Sprintf("%s?%s", path, encodedQuery) } } res, err := c.RawReq("GET", path, nil, nil, nil)...
go
func (c *Client) GetAppLog(appID string, opts *logagg.LogOpts) (io.ReadCloser, error) { path := fmt.Sprintf("/apps/%s/log", appID) if opts != nil { if encodedQuery := opts.EncodedQuery(); encodedQuery != "" { path = fmt.Sprintf("%s?%s", path, encodedQuery) } } res, err := c.RawReq("GET", path, nil, nil, nil)...
[ "func", "(", "c", "*", "Client", ")", "GetAppLog", "(", "appID", "string", ",", "opts", "*", "logagg", ".", "LogOpts", ")", "(", "io", ".", "ReadCloser", ",", "error", ")", "{", "path", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "appID", ...
// GetAppLog returns a ReadCloser log stream of the app with ID appID. If lines // is zero or above, the number of lines returned will be capped at that value. // Otherwise, all available logs are returned. If follow is true, new log lines // are streamed after the buffered log.
[ "GetAppLog", "returns", "a", "ReadCloser", "log", "stream", "of", "the", "app", "with", "ID", "appID", ".", "If", "lines", "is", "zero", "or", "above", "the", "number", "of", "lines", "returned", "will", "be", "capped", "at", "that", "value", ".", "Other...
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L501-L513
27,444
flynn/flynn
controller/client/v1/client.go
StreamAppLog
func (c *Client) StreamAppLog(appID string, opts *logagg.LogOpts, output chan<- *ct.SSELogChunk) (stream.Stream, error) { path := fmt.Sprintf("/apps/%s/log", appID) if opts != nil { if encodedQuery := opts.EncodedQuery(); encodedQuery != "" { path = fmt.Sprintf("%s?%s", path, encodedQuery) } } return c.Strea...
go
func (c *Client) StreamAppLog(appID string, opts *logagg.LogOpts, output chan<- *ct.SSELogChunk) (stream.Stream, error) { path := fmt.Sprintf("/apps/%s/log", appID) if opts != nil { if encodedQuery := opts.EncodedQuery(); encodedQuery != "" { path = fmt.Sprintf("%s?%s", path, encodedQuery) } } return c.Strea...
[ "func", "(", "c", "*", "Client", ")", "StreamAppLog", "(", "appID", "string", ",", "opts", "*", "logagg", ".", "LogOpts", ",", "output", "chan", "<-", "*", "ct", ".", "SSELogChunk", ")", "(", "stream", ".", "Stream", ",", "error", ")", "{", "path", ...
// StreamAppLog is the same as GetAppLog but returns log lines via an SSE stream
[ "StreamAppLog", "is", "the", "same", "as", "GetAppLog", "but", "returns", "log", "lines", "via", "an", "SSE", "stream" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L516-L524
27,445
flynn/flynn
controller/client/v1/client.go
GetDeployment
func (c *Client) GetDeployment(deploymentID string) (*ct.Deployment, error) { res := &ct.Deployment{} return res, c.Get(fmt.Sprintf("/deployments/%s", deploymentID), res) }
go
func (c *Client) GetDeployment(deploymentID string) (*ct.Deployment, error) { res := &ct.Deployment{} return res, c.Get(fmt.Sprintf("/deployments/%s", deploymentID), res) }
[ "func", "(", "c", "*", "Client", ")", "GetDeployment", "(", "deploymentID", "string", ")", "(", "*", "ct", ".", "Deployment", ",", "error", ")", "{", "res", ":=", "&", "ct", ".", "Deployment", "{", "}", "\n", "return", "res", ",", "c", ".", "Get", ...
// GetDeployment returns a deployment queued on the deployer.
[ "GetDeployment", "returns", "a", "deployment", "queued", "on", "the", "deployer", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L527-L530
27,446
flynn/flynn
controller/client/v1/client.go
DeploymentList
func (c *Client) DeploymentList(appID string) ([]*ct.Deployment, error) { var deployments []*ct.Deployment return deployments, c.Get(fmt.Sprintf("/apps/%s/deployments", appID), &deployments) }
go
func (c *Client) DeploymentList(appID string) ([]*ct.Deployment, error) { var deployments []*ct.Deployment return deployments, c.Get(fmt.Sprintf("/apps/%s/deployments", appID), &deployments) }
[ "func", "(", "c", "*", "Client", ")", "DeploymentList", "(", "appID", "string", ")", "(", "[", "]", "*", "ct", ".", "Deployment", ",", "error", ")", "{", "var", "deployments", "[", "]", "*", "ct", ".", "Deployment", "\n", "return", "deployments", ","...
// DeploymentList returns a list of all deployments.
[ "DeploymentList", "returns", "a", "list", "of", "all", "deployments", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L538-L541
27,447
flynn/flynn
controller/client/v1/client.go
StreamJobEvents
func (c *Client) StreamJobEvents(appID string, output chan *ct.Job) (stream.Stream, error) { appEvents := make(chan *ct.Event) go convertEvents(appEvents, output) return c.StreamEvents(ct.StreamEventsOptions{ AppID: appID, ObjectTypes: []ct.EventType{ct.EventTypeJob}, }, appEvents) }
go
func (c *Client) StreamJobEvents(appID string, output chan *ct.Job) (stream.Stream, error) { appEvents := make(chan *ct.Event) go convertEvents(appEvents, output) return c.StreamEvents(ct.StreamEventsOptions{ AppID: appID, ObjectTypes: []ct.EventType{ct.EventTypeJob}, }, appEvents) }
[ "func", "(", "c", "*", "Client", ")", "StreamJobEvents", "(", "appID", "string", ",", "output", "chan", "*", "ct", ".", "Job", ")", "(", "stream", ".", "Stream", ",", "error", ")", "{", "appEvents", ":=", "make", "(", "chan", "*", "ct", ".", "Event...
// StreamJobEvents streams job events to the output channel.
[ "StreamJobEvents", "streams", "job", "events", "to", "the", "output", "channel", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L611-L618
27,448
flynn/flynn
controller/client/v1/client.go
RunJobAttached
func (c *Client) RunJobAttached(appID string, job *ct.NewJob) (httpclient.ReadWriteCloser, error) { return c.Hijack("POST", fmt.Sprintf("/apps/%s/jobs", appID), http.Header{"Upgrade": {"flynn-attach/0"}}, job) }
go
func (c *Client) RunJobAttached(appID string, job *ct.NewJob) (httpclient.ReadWriteCloser, error) { return c.Hijack("POST", fmt.Sprintf("/apps/%s/jobs", appID), http.Header{"Upgrade": {"flynn-attach/0"}}, job) }
[ "func", "(", "c", "*", "Client", ")", "RunJobAttached", "(", "appID", "string", ",", "job", "*", "ct", ".", "NewJob", ")", "(", "httpclient", ".", "ReadWriteCloser", ",", "error", ")", "{", "return", "c", ".", "Hijack", "(", "\"", "\"", ",", "fmt", ...
// RunJobAttached runs a new job under the specified app, attaching to the job // and returning a ReadWriteCloser stream, which can then be used for // communicating with the job.
[ "RunJobAttached", "runs", "a", "new", "job", "under", "the", "specified", "app", "attaching", "to", "the", "job", "and", "returning", "a", "ReadWriteCloser", "stream", "which", "can", "then", "be", "used", "for", "communicating", "with", "the", "job", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L724-L726
27,449
flynn/flynn
controller/client/v1/client.go
RunJobDetached
func (c *Client) RunJobDetached(appID string, req *ct.NewJob) (*ct.Job, error) { job := &ct.Job{} return job, c.Post(fmt.Sprintf("/apps/%s/jobs", appID), req, job) }
go
func (c *Client) RunJobDetached(appID string, req *ct.NewJob) (*ct.Job, error) { job := &ct.Job{} return job, c.Post(fmt.Sprintf("/apps/%s/jobs", appID), req, job) }
[ "func", "(", "c", "*", "Client", ")", "RunJobDetached", "(", "appID", "string", ",", "req", "*", "ct", ".", "NewJob", ")", "(", "*", "ct", ".", "Job", ",", "error", ")", "{", "job", ":=", "&", "ct", ".", "Job", "{", "}", "\n", "return", "job", ...
// RunJobDetached runs a new job under the specified app, returning the job's // details.
[ "RunJobDetached", "runs", "a", "new", "job", "under", "the", "specified", "app", "returning", "the", "job", "s", "details", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L730-L733
27,450
flynn/flynn
controller/client/v1/client.go
GetJob
func (c *Client) GetJob(appID, jobID string) (*ct.Job, error) { job := &ct.Job{} return job, c.Get(fmt.Sprintf("/apps/%s/jobs/%s", appID, jobID), job) }
go
func (c *Client) GetJob(appID, jobID string) (*ct.Job, error) { job := &ct.Job{} return job, c.Get(fmt.Sprintf("/apps/%s/jobs/%s", appID, jobID), job) }
[ "func", "(", "c", "*", "Client", ")", "GetJob", "(", "appID", ",", "jobID", "string", ")", "(", "*", "ct", ".", "Job", ",", "error", ")", "{", "job", ":=", "&", "ct", ".", "Job", "{", "}", "\n", "return", "job", ",", "c", ".", "Get", "(", "...
// GetJob returns a Job for the given app and job ID
[ "GetJob", "returns", "a", "Job", "for", "the", "given", "app", "and", "job", "ID" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L736-L739
27,451
flynn/flynn
controller/client/v1/client.go
JobList
func (c *Client) JobList(appID string) ([]*ct.Job, error) { var jobs []*ct.Job return jobs, c.Get(fmt.Sprintf("/apps/%s/jobs", appID), &jobs) }
go
func (c *Client) JobList(appID string) ([]*ct.Job, error) { var jobs []*ct.Job return jobs, c.Get(fmt.Sprintf("/apps/%s/jobs", appID), &jobs) }
[ "func", "(", "c", "*", "Client", ")", "JobList", "(", "appID", "string", ")", "(", "[", "]", "*", "ct", ".", "Job", ",", "error", ")", "{", "var", "jobs", "[", "]", "*", "ct", ".", "Job", "\n", "return", "jobs", ",", "c", ".", "Get", "(", "...
// JobList returns a list of all jobs.
[ "JobList", "returns", "a", "list", "of", "all", "jobs", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L742-L745
27,452
flynn/flynn
controller/client/v1/client.go
JobListActive
func (c *Client) JobListActive() ([]*ct.Job, error) { var jobs []*ct.Job return jobs, c.Get("/active-jobs", &jobs) }
go
func (c *Client) JobListActive() ([]*ct.Job, error) { var jobs []*ct.Job return jobs, c.Get("/active-jobs", &jobs) }
[ "func", "(", "c", "*", "Client", ")", "JobListActive", "(", ")", "(", "[", "]", "*", "ct", ".", "Job", ",", "error", ")", "{", "var", "jobs", "[", "]", "*", "ct", ".", "Job", "\n", "return", "jobs", ",", "c", ".", "Get", "(", "\"", "\"", ",...
// JobListActive returns a list of all active jobs.
[ "JobListActive", "returns", "a", "list", "of", "all", "active", "jobs", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L748-L751
27,453
flynn/flynn
controller/client/v1/client.go
AppList
func (c *Client) AppList() ([]*ct.App, error) { var apps []*ct.App return apps, c.Get("/apps", &apps) }
go
func (c *Client) AppList() ([]*ct.App, error) { var apps []*ct.App return apps, c.Get("/apps", &apps) }
[ "func", "(", "c", "*", "Client", ")", "AppList", "(", ")", "(", "[", "]", "*", "ct", ".", "App", ",", "error", ")", "{", "var", "apps", "[", "]", "*", "ct", ".", "App", "\n", "return", "apps", ",", "c", ".", "Get", "(", "\"", "\"", ",", "...
// AppList returns a list of all apps.
[ "AppList", "returns", "a", "list", "of", "all", "apps", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L754-L757
27,454
flynn/flynn
controller/client/v1/client.go
ArtifactList
func (c *Client) ArtifactList() ([]*ct.Artifact, error) { var artifacts []*ct.Artifact return artifacts, c.Get("/artifacts", &artifacts) }
go
func (c *Client) ArtifactList() ([]*ct.Artifact, error) { var artifacts []*ct.Artifact return artifacts, c.Get("/artifacts", &artifacts) }
[ "func", "(", "c", "*", "Client", ")", "ArtifactList", "(", ")", "(", "[", "]", "*", "ct", ".", "Artifact", ",", "error", ")", "{", "var", "artifacts", "[", "]", "*", "ct", ".", "Artifact", "\n", "return", "artifacts", ",", "c", ".", "Get", "(", ...
// ArtifactList returns a list of all artifacts
[ "ArtifactList", "returns", "a", "list", "of", "all", "artifacts" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L760-L763
27,455
flynn/flynn
controller/client/v1/client.go
ReleaseList
func (c *Client) ReleaseList() ([]*ct.Release, error) { var releases []*ct.Release return releases, c.Get("/releases", &releases) }
go
func (c *Client) ReleaseList() ([]*ct.Release, error) { var releases []*ct.Release return releases, c.Get("/releases", &releases) }
[ "func", "(", "c", "*", "Client", ")", "ReleaseList", "(", ")", "(", "[", "]", "*", "ct", ".", "Release", ",", "error", ")", "{", "var", "releases", "[", "]", "*", "ct", ".", "Release", "\n", "return", "releases", ",", "c", ".", "Get", "(", "\""...
// ReleaseList returns a list of all releases
[ "ReleaseList", "returns", "a", "list", "of", "all", "releases" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L766-L769
27,456
flynn/flynn
controller/client/v1/client.go
AppReleaseList
func (c *Client) AppReleaseList(appID string) ([]*ct.Release, error) { var releases []*ct.Release return releases, c.Get(fmt.Sprintf("/apps/%s/releases", appID), &releases) }
go
func (c *Client) AppReleaseList(appID string) ([]*ct.Release, error) { var releases []*ct.Release return releases, c.Get(fmt.Sprintf("/apps/%s/releases", appID), &releases) }
[ "func", "(", "c", "*", "Client", ")", "AppReleaseList", "(", "appID", "string", ")", "(", "[", "]", "*", "ct", ".", "Release", ",", "error", ")", "{", "var", "releases", "[", "]", "*", "ct", ".", "Release", "\n", "return", "releases", ",", "c", "...
// AppReleaseList returns a list of all releases under appID.
[ "AppReleaseList", "returns", "a", "list", "of", "all", "releases", "under", "appID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L772-L775
27,457
flynn/flynn
controller/client/v1/client.go
ProviderList
func (c *Client) ProviderList() ([]*ct.Provider, error) { var providers []*ct.Provider return providers, c.Get("/providers", &providers) }
go
func (c *Client) ProviderList() ([]*ct.Provider, error) { var providers []*ct.Provider return providers, c.Get("/providers", &providers) }
[ "func", "(", "c", "*", "Client", ")", "ProviderList", "(", ")", "(", "[", "]", "*", "ct", ".", "Provider", ",", "error", ")", "{", "var", "providers", "[", "]", "*", "ct", ".", "Provider", "\n", "return", "providers", ",", "c", ".", "Get", "(", ...
// ProviderList returns a list of all providers.
[ "ProviderList", "returns", "a", "list", "of", "all", "providers", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L778-L781
27,458
flynn/flynn
controller/client/v1/client.go
GetVolume
func (c *Client) GetVolume(appID, id string) (*ct.Volume, error) { if appID == "" { return nil, errors.New("controller: missing app ID") } if id == "" { return nil, errors.New("controller: missing id") } vol := &ct.Volume{} return vol, c.Get(fmt.Sprintf("/apps/%s/volumes/%s", appID, id), vol) }
go
func (c *Client) GetVolume(appID, id string) (*ct.Volume, error) { if appID == "" { return nil, errors.New("controller: missing app ID") } if id == "" { return nil, errors.New("controller: missing id") } vol := &ct.Volume{} return vol, c.Get(fmt.Sprintf("/apps/%s/volumes/%s", appID, id), vol) }
[ "func", "(", "c", "*", "Client", ")", "GetVolume", "(", "appID", ",", "id", "string", ")", "(", "*", "ct", ".", "Volume", ",", "error", ")", "{", "if", "appID", "==", "\"", "\"", "{", "return", "nil", ",", "errors", ".", "New", "(", "\"", "\"",...
// GetVolume returns a Volume for the given volume ID
[ "GetVolume", "returns", "a", "Volume", "for", "the", "given", "volume", "ID" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L784-L793
27,459
flynn/flynn
controller/client/v1/client.go
PutVolume
func (c *Client) PutVolume(vol *ct.Volume) error { if vol.ID == "" { return errors.New("controller: missing id") } return c.Put(fmt.Sprintf("/volumes/%s", vol.ID), vol, vol) }
go
func (c *Client) PutVolume(vol *ct.Volume) error { if vol.ID == "" { return errors.New("controller: missing id") } return c.Put(fmt.Sprintf("/volumes/%s", vol.ID), vol, vol) }
[ "func", "(", "c", "*", "Client", ")", "PutVolume", "(", "vol", "*", "ct", ".", "Volume", ")", "error", "{", "if", "vol", ".", "ID", "==", "\"", "\"", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "return", "c", "...
// PutVolume updates an existing volume.
[ "PutVolume", "updates", "an", "existing", "volume", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L796-L801
27,460
flynn/flynn
controller/client/v1/client.go
VolumeList
func (c *Client) VolumeList() ([]*ct.Volume, error) { var volumes []*ct.Volume return volumes, c.Get("/volumes", &volumes) }
go
func (c *Client) VolumeList() ([]*ct.Volume, error) { var volumes []*ct.Volume return volumes, c.Get("/volumes", &volumes) }
[ "func", "(", "c", "*", "Client", ")", "VolumeList", "(", ")", "(", "[", "]", "*", "ct", ".", "Volume", ",", "error", ")", "{", "var", "volumes", "[", "]", "*", "ct", ".", "Volume", "\n", "return", "volumes", ",", "c", ".", "Get", "(", "\"", "...
// VolumeList returns a list of all volumes.
[ "VolumeList", "returns", "a", "list", "of", "all", "volumes", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L804-L807
27,461
flynn/flynn
controller/client/v1/client.go
AppVolumeList
func (c *Client) AppVolumeList(appID string) ([]*ct.Volume, error) { if appID == "" { return nil, errors.New("controller: missing app ID") } var volumes []*ct.Volume return volumes, c.Get(fmt.Sprintf("/apps/%s/volumes", appID), &volumes) }
go
func (c *Client) AppVolumeList(appID string) ([]*ct.Volume, error) { if appID == "" { return nil, errors.New("controller: missing app ID") } var volumes []*ct.Volume return volumes, c.Get(fmt.Sprintf("/apps/%s/volumes", appID), &volumes) }
[ "func", "(", "c", "*", "Client", ")", "AppVolumeList", "(", "appID", "string", ")", "(", "[", "]", "*", "ct", ".", "Volume", ",", "error", ")", "{", "if", "appID", "==", "\"", "\"", "{", "return", "nil", ",", "errors", ".", "New", "(", "\"", "\...
// AppVolumeList returns a list of all volumes for an app.
[ "AppVolumeList", "returns", "a", "list", "of", "all", "volumes", "for", "an", "app", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L810-L816
27,462
flynn/flynn
controller/client/v1/client.go
DecommissionVolume
func (c *Client) DecommissionVolume(appID string, vol *ct.Volume) error { if appID == "" { return errors.New("controller: missing app ID") } if vol.ID == "" { return errors.New("controller: missing id") } return c.Put(fmt.Sprintf("/apps/%s/volumes/%s/decommission", appID, vol.ID), &vol, &vol) }
go
func (c *Client) DecommissionVolume(appID string, vol *ct.Volume) error { if appID == "" { return errors.New("controller: missing app ID") } if vol.ID == "" { return errors.New("controller: missing id") } return c.Put(fmt.Sprintf("/apps/%s/volumes/%s/decommission", appID, vol.ID), &vol, &vol) }
[ "func", "(", "c", "*", "Client", ")", "DecommissionVolume", "(", "appID", "string", ",", "vol", "*", "ct", ".", "Volume", ")", "error", "{", "if", "appID", "==", "\"", "\"", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\...
// DecommissionVolume decommissions a volume
[ "DecommissionVolume", "decommissions", "a", "volume" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L819-L827
27,463
flynn/flynn
controller/client/v1/client.go
StreamVolumes
func (c *Client) StreamVolumes(since *time.Time, output chan *ct.Volume) (stream.Stream, error) { if since == nil { s := time.Unix(0, 0) since = &s } t := since.UTC().Format(time.RFC3339Nano) return c.Stream("GET", "/volumes?since="+t, nil, output) }
go
func (c *Client) StreamVolumes(since *time.Time, output chan *ct.Volume) (stream.Stream, error) { if since == nil { s := time.Unix(0, 0) since = &s } t := since.UTC().Format(time.RFC3339Nano) return c.Stream("GET", "/volumes?since="+t, nil, output) }
[ "func", "(", "c", "*", "Client", ")", "StreamVolumes", "(", "since", "*", "time", ".", "Time", ",", "output", "chan", "*", "ct", ".", "Volume", ")", "(", "stream", ".", "Stream", ",", "error", ")", "{", "if", "since", "==", "nil", "{", "s", ":=",...
// StreamVolumes sends a series of Volume into the provided channel. // If since is not nil, only retrieves volume updates since the specified time.
[ "StreamVolumes", "sends", "a", "series", "of", "Volume", "into", "the", "provided", "channel", ".", "If", "since", "is", "not", "nil", "only", "retrieves", "volume", "updates", "since", "the", "specified", "time", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L831-L838
27,464
flynn/flynn
controller/client/v1/client.go
Backup
func (c *Client) Backup() (io.ReadCloser, error) { res, err := c.RawReq("GET", "/backup", nil, nil, nil) if err != nil { return nil, err } return res.Body, nil }
go
func (c *Client) Backup() (io.ReadCloser, error) { res, err := c.RawReq("GET", "/backup", nil, nil, nil) if err != nil { return nil, err } return res.Body, nil }
[ "func", "(", "c", "*", "Client", ")", "Backup", "(", ")", "(", "io", ".", "ReadCloser", ",", "error", ")", "{", "res", ",", "err", ":=", "c", ".", "RawReq", "(", "\"", "\"", ",", "\"", "\"", ",", "nil", ",", "nil", ",", "nil", ")", "\n", "i...
// Backup takes a backup of the cluster
[ "Backup", "takes", "a", "backup", "of", "the", "cluster" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L841-L847
27,465
flynn/flynn
controller/client/v1/client.go
GetBackupMeta
func (c *Client) GetBackupMeta() (*ct.ClusterBackup, error) { b := &ct.ClusterBackup{} return b, c.Get("/backup", b) }
go
func (c *Client) GetBackupMeta() (*ct.ClusterBackup, error) { b := &ct.ClusterBackup{} return b, c.Get("/backup", b) }
[ "func", "(", "c", "*", "Client", ")", "GetBackupMeta", "(", ")", "(", "*", "ct", ".", "ClusterBackup", ",", "error", ")", "{", "b", ":=", "&", "ct", ".", "ClusterBackup", "{", "}", "\n", "return", "b", ",", "c", ".", "Get", "(", "\"", "\"", ","...
// GetBackupMeta returns metadata for latest backup
[ "GetBackupMeta", "returns", "metadata", "for", "latest", "backup" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L850-L853
27,466
flynn/flynn
controller/client/v1/client.go
DeleteRelease
func (c *Client) DeleteRelease(appID, releaseID string) (*ct.ReleaseDeletion, error) { events := make(chan *ct.Event) stream, err := c.StreamEvents(ct.StreamEventsOptions{ AppID: appID, ObjectID: releaseID, ObjectTypes: []ct.EventType{ct.EventTypeReleaseDeletion}, }, events) if err != nil { return ...
go
func (c *Client) DeleteRelease(appID, releaseID string) (*ct.ReleaseDeletion, error) { events := make(chan *ct.Event) stream, err := c.StreamEvents(ct.StreamEventsOptions{ AppID: appID, ObjectID: releaseID, ObjectTypes: []ct.EventType{ct.EventTypeReleaseDeletion}, }, events) if err != nil { return ...
[ "func", "(", "c", "*", "Client", ")", "DeleteRelease", "(", "appID", ",", "releaseID", "string", ")", "(", "*", "ct", ".", "ReleaseDeletion", ",", "error", ")", "{", "events", ":=", "make", "(", "chan", "*", "ct", ".", "Event", ")", "\n", "stream", ...
// DeleteRelease deletes a release and any associated file artifacts.
[ "DeleteRelease", "deletes", "a", "release", "and", "any", "associated", "file", "artifacts", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L856-L888
27,467
flynn/flynn
controller/client/v1/client.go
ScheduleAppGarbageCollection
func (c *Client) ScheduleAppGarbageCollection(appID string) error { return c.Post(fmt.Sprintf("/apps/%s/gc", appID), nil, nil) }
go
func (c *Client) ScheduleAppGarbageCollection(appID string) error { return c.Post(fmt.Sprintf("/apps/%s/gc", appID), nil, nil) }
[ "func", "(", "c", "*", "Client", ")", "ScheduleAppGarbageCollection", "(", "appID", "string", ")", "error", "{", "return", "c", ".", "Post", "(", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "appID", ")", ",", "nil", ",", "nil", ")", "\n", "}" ]
// ScheduleAppGarbageCollection schedules a garbage collection cycle for the app
[ "ScheduleAppGarbageCollection", "schedules", "a", "garbage", "collection", "cycle", "for", "the", "app" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L891-L893
27,468
flynn/flynn
controller/client/v1/client.go
Status
func (c *Client) Status() (*status.Status, error) { type statusResponse struct { Data status.Status `json:"data"` } s := &statusResponse{} if err := c.Get(status.Path, s); err != nil { return nil, err } return &s.Data, nil }
go
func (c *Client) Status() (*status.Status, error) { type statusResponse struct { Data status.Status `json:"data"` } s := &statusResponse{} if err := c.Get(status.Path, s); err != nil { return nil, err } return &s.Data, nil }
[ "func", "(", "c", "*", "Client", ")", "Status", "(", ")", "(", "*", "status", ".", "Status", ",", "error", ")", "{", "type", "statusResponse", "struct", "{", "Data", "status", ".", "Status", "`json:\"data\"`", "\n", "}", "\n", "s", ":=", "&", "status...
// Status gets the controller status
[ "Status", "gets", "the", "controller", "status" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L896-L905
27,469
flynn/flynn
controller/client/v1/client.go
CreateSink
func (c *Client) CreateSink(sink *ct.Sink) error { return c.Post("/sinks", sink, sink) }
go
func (c *Client) CreateSink(sink *ct.Sink) error { return c.Post("/sinks", sink, sink) }
[ "func", "(", "c", "*", "Client", ")", "CreateSink", "(", "sink", "*", "ct", ".", "Sink", ")", "error", "{", "return", "c", ".", "Post", "(", "\"", "\"", ",", "sink", ",", "sink", ")", "\n", "}" ]
// CreateSink creates a new log sink
[ "CreateSink", "creates", "a", "new", "log", "sink" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L908-L910
27,470
flynn/flynn
controller/client/v1/client.go
GetSink
func (c *Client) GetSink(sinkID string) (*ct.Sink, error) { sink := &ct.Sink{} return sink, c.Get(fmt.Sprintf("/sinks/%s", sinkID), sink) }
go
func (c *Client) GetSink(sinkID string) (*ct.Sink, error) { sink := &ct.Sink{} return sink, c.Get(fmt.Sprintf("/sinks/%s", sinkID), sink) }
[ "func", "(", "c", "*", "Client", ")", "GetSink", "(", "sinkID", "string", ")", "(", "*", "ct", ".", "Sink", ",", "error", ")", "{", "sink", ":=", "&", "ct", ".", "Sink", "{", "}", "\n", "return", "sink", ",", "c", ".", "Get", "(", "fmt", ".",...
// GetSink gets a log sink
[ "GetSink", "gets", "a", "log", "sink" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L913-L916
27,471
flynn/flynn
controller/client/v1/client.go
DeleteSink
func (c *Client) DeleteSink(sinkID string) (*ct.Sink, error) { sink := &ct.Sink{} return sink, c.Delete(fmt.Sprintf("/sinks/%s", sinkID), sink) }
go
func (c *Client) DeleteSink(sinkID string) (*ct.Sink, error) { sink := &ct.Sink{} return sink, c.Delete(fmt.Sprintf("/sinks/%s", sinkID), sink) }
[ "func", "(", "c", "*", "Client", ")", "DeleteSink", "(", "sinkID", "string", ")", "(", "*", "ct", ".", "Sink", ",", "error", ")", "{", "sink", ":=", "&", "ct", ".", "Sink", "{", "}", "\n", "return", "sink", ",", "c", ".", "Delete", "(", "fmt", ...
// DeleteSink removes a log sink
[ "DeleteSink", "removes", "a", "log", "sink" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L919-L922
27,472
flynn/flynn
controller/client/v1/client.go
ListSinks
func (c *Client) ListSinks() ([]*ct.Sink, error) { var sinks []*ct.Sink return sinks, c.Get("/sinks", &sinks) }
go
func (c *Client) ListSinks() ([]*ct.Sink, error) { var sinks []*ct.Sink return sinks, c.Get("/sinks", &sinks) }
[ "func", "(", "c", "*", "Client", ")", "ListSinks", "(", ")", "(", "[", "]", "*", "ct", ".", "Sink", ",", "error", ")", "{", "var", "sinks", "[", "]", "*", "ct", ".", "Sink", "\n", "return", "sinks", ",", "c", ".", "Get", "(", "\"", "\"", ",...
// ListSink returns all log sinks
[ "ListSink", "returns", "all", "log", "sinks" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/client/v1/client.go#L925-L928
27,473
flynn/flynn
discoverd/client/watch.go
addInst
func (w *Watch) addInst(inst *Instance) (known, identical bool) { var i *Instance i, known = w.instances[inst.ID] identical = known && i.Equal(inst) w.instances[inst.ID] = inst return }
go
func (w *Watch) addInst(inst *Instance) (known, identical bool) { var i *Instance i, known = w.instances[inst.ID] identical = known && i.Equal(inst) w.instances[inst.ID] = inst return }
[ "func", "(", "w", "*", "Watch", ")", "addInst", "(", "inst", "*", "Instance", ")", "(", "known", ",", "identical", "bool", ")", "{", "var", "i", "*", "Instance", "\n", "i", ",", "known", "=", "w", ".", "instances", "[", "inst", ".", "ID", "]", ...
// addInst adds the given instance to the local state and returns whether the // instance already existed in the local state, and if it did exist, whether it // was identical.
[ "addInst", "adds", "the", "given", "instance", "to", "the", "local", "state", "and", "returns", "whether", "the", "instance", "already", "existed", "in", "the", "local", "state", "and", "if", "it", "did", "exist", "whether", "it", "was", "identical", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/client/watch.go#L64-L70
27,474
flynn/flynn
discoverd/client/watch.go
delInst
func (w *Watch) delInst(inst *Instance) { delete(w.instances, inst.ID) }
go
func (w *Watch) delInst(inst *Instance) { delete(w.instances, inst.ID) }
[ "func", "(", "w", "*", "Watch", ")", "delInst", "(", "inst", "*", "Instance", ")", "{", "delete", "(", "w", ".", "instances", ",", "inst", ".", "ID", ")", "\n", "}" ]
// delInst removes the given instance from the local state.
[ "delInst", "removes", "the", "given", "instance", "from", "the", "local", "state", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/discoverd/client/watch.go#L73-L75
27,475
flynn/flynn
controller/scheduler/scheduler.go
maybeStartBlockedJobs
func (s *Scheduler) maybeStartBlockedJobs(host *Host) { for _, job := range s.jobs { if job.State == JobStateBlocked && job.TagsMatchHost(host) { job.State = JobStatePending go s.StartJob(job) } } }
go
func (s *Scheduler) maybeStartBlockedJobs(host *Host) { for _, job := range s.jobs { if job.State == JobStateBlocked && job.TagsMatchHost(host) { job.State = JobStatePending go s.StartJob(job) } } }
[ "func", "(", "s", "*", "Scheduler", ")", "maybeStartBlockedJobs", "(", "host", "*", "Host", ")", "{", "for", "_", ",", "job", ":=", "range", "s", ".", "jobs", "{", "if", "job", ".", "State", "==", "JobStateBlocked", "&&", "job", ".", "TagsMatchHost", ...
// maybeStartBlockedJobs starts any jobs which are blocked due to not // matching tags of any hosts on the given host, which is expected to be // either a new host or a host whose tags have just changed
[ "maybeStartBlockedJobs", "starts", "any", "jobs", "which", "are", "blocked", "due", "to", "not", "matching", "tags", "of", "any", "hosts", "on", "the", "given", "host", "which", "is", "expected", "to", "be", "either", "a", "new", "host", "or", "a", "host",...
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/scheduler/scheduler.go#L1003-L1010
27,476
flynn/flynn
controller/scheduler/scheduler.go
findVolume
func (s *Scheduler) findVolume(job *Job, req *ct.VolumeReq) *Volume { for _, vol := range s.volumes { // skip destroyed or decommissioned volumes if vol.GetState() == ct.VolumeStateDestroyed || vol.DecommissionedAt != nil { continue } // skip if the app, release, type or path do not match if vol.AppID !=...
go
func (s *Scheduler) findVolume(job *Job, req *ct.VolumeReq) *Volume { for _, vol := range s.volumes { // skip destroyed or decommissioned volumes if vol.GetState() == ct.VolumeStateDestroyed || vol.DecommissionedAt != nil { continue } // skip if the app, release, type or path do not match if vol.AppID !=...
[ "func", "(", "s", "*", "Scheduler", ")", "findVolume", "(", "job", "*", "Job", ",", "req", "*", "ct", ".", "VolumeReq", ")", "*", "Volume", "{", "for", "_", ",", "vol", ":=", "range", "s", ".", "volumes", "{", "// skip destroyed or decommissioned volumes...
// findVolume looks for an existing, unassigned volume which matches the given // job's app, release and type, and the volume request's path
[ "findVolume", "looks", "for", "an", "existing", "unassigned", "volume", "which", "matches", "the", "given", "job", "s", "app", "release", "and", "type", "and", "the", "volume", "request", "s", "path" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/scheduler/scheduler.go#L1040-L1076
27,477
flynn/flynn
controller/scheduler/scheduler.go
activeFormationCount
func (s *Scheduler) activeFormationCount(appID string) int { activeReleases := make(map[string]struct{}) for _, job := range s.jobs { if job.IsRunning() && job.IsInApp(appID) { activeReleases[job.Formation.Release.ID] = struct{}{} } } return len(activeReleases) }
go
func (s *Scheduler) activeFormationCount(appID string) int { activeReleases := make(map[string]struct{}) for _, job := range s.jobs { if job.IsRunning() && job.IsInApp(appID) { activeReleases[job.Formation.Release.ID] = struct{}{} } } return len(activeReleases) }
[ "func", "(", "s", "*", "Scheduler", ")", "activeFormationCount", "(", "appID", "string", ")", "int", "{", "activeReleases", ":=", "make", "(", "map", "[", "string", "]", "struct", "{", "}", ")", "\n", "for", "_", ",", "job", ":=", "range", "s", ".", ...
// activeFormationCount returns the number of formations which have running // jobs for the given app
[ "activeFormationCount", "returns", "the", "number", "of", "formations", "which", "have", "running", "jobs", "for", "the", "given", "app" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/scheduler/scheduler.go#L1537-L1545
27,478
flynn/flynn
controller/scheduler/scheduler.go
findJobToStop
func (s *Scheduler) findJobToStop(f *Formation, typ string) (*Job, error) { var found *Job for _, job := range s.jobs.WithFormationAndType(f, typ) { switch job.State { case JobStatePending: return job, nil case JobStateStarting, JobStateRunning: // if the job is on a host which is shutting down, // ret...
go
func (s *Scheduler) findJobToStop(f *Formation, typ string) (*Job, error) { var found *Job for _, job := range s.jobs.WithFormationAndType(f, typ) { switch job.State { case JobStatePending: return job, nil case JobStateStarting, JobStateRunning: // if the job is on a host which is shutting down, // ret...
[ "func", "(", "s", "*", "Scheduler", ")", "findJobToStop", "(", "f", "*", "Formation", ",", "typ", "string", ")", "(", "*", "Job", ",", "error", ")", "{", "var", "found", "*", "Job", "\n", "for", "_", ",", "job", ":=", "range", "s", ".", "jobs", ...
// findJobToStop finds a job from the given formation and type which should be // stopped, choosing pending jobs if present, and the most recently started job // otherwise
[ "findJobToStop", "finds", "a", "job", "from", "the", "given", "formation", "and", "type", "which", "should", "be", "stopped", "choosing", "pending", "jobs", "if", "present", "and", "the", "most", "recently", "started", "job", "otherwise" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/controller/scheduler/scheduler.go#L2478-L2508
27,479
flynn/flynn
appliance/redis/cmd/flynn-redis/main.go
readID
func (m *Main) readID(path string) (string, error) { buf, err := ioutil.ReadFile(path) if err != nil && !os.IsNotExist(err) { return "", fmt.Errorf("error reading instance ID: %s", err) } // If the ID exists then return it immediately. id := string(buf) if id != "" { return id, nil } // Generate a new ID ...
go
func (m *Main) readID(path string) (string, error) { buf, err := ioutil.ReadFile(path) if err != nil && !os.IsNotExist(err) { return "", fmt.Errorf("error reading instance ID: %s", err) } // If the ID exists then return it immediately. id := string(buf) if id != "" { return id, nil } // Generate a new ID ...
[ "func", "(", "m", "*", "Main", ")", "readID", "(", "path", "string", ")", "(", "string", ",", "error", ")", "{", "buf", ",", "err", ":=", "ioutil", ".", "ReadFile", "(", "path", ")", "\n", "if", "err", "!=", "nil", "&&", "!", "os", ".", "IsNotE...
// readID reads the instance id from path. // If the file instance id doesn't exist then a random ID is generated.
[ "readID", "reads", "the", "instance", "id", "from", "path", ".", "If", "the", "file", "instance", "id", "doesn", "t", "exist", "then", "a", "random", "ID", "is", "generated", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/appliance/redis/cmd/flynn-redis/main.go#L195-L213
27,480
flynn/flynn
host/fixer/fixer.go
FindAppReleaseJobs
func (f *ClusterFixer) FindAppReleaseJobs(app, typ string) []map[string]*host.Job { var sortReleases ReleasesByCreate releases := make(map[string]map[string]*host.ActiveJob) // map of releaseID -> hostID -> job ordered // connect to each host, list jobs, find distinct releases for _, h := range f.hosts { jobs, er...
go
func (f *ClusterFixer) FindAppReleaseJobs(app, typ string) []map[string]*host.Job { var sortReleases ReleasesByCreate releases := make(map[string]map[string]*host.ActiveJob) // map of releaseID -> hostID -> job ordered // connect to each host, list jobs, find distinct releases for _, h := range f.hosts { jobs, er...
[ "func", "(", "f", "*", "ClusterFixer", ")", "FindAppReleaseJobs", "(", "app", ",", "typ", "string", ")", "[", "]", "map", "[", "string", "]", "*", "host", ".", "Job", "{", "var", "sortReleases", "ReleasesByCreate", "\n", "releases", ":=", "make", "(", ...
// FindAppReleaseJobs returns a slice with one map of host id to job for each // known release of the given app and type, most recent first
[ "FindAppReleaseJobs", "returns", "a", "slice", "with", "one", "map", "of", "host", "id", "to", "job", "for", "each", "known", "release", "of", "the", "given", "app", "and", "type", "most", "recent", "first" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/host/fixer/fixer.go#L220-L260
27,481
flynn/flynn
pkg/cors/cors.go
IsOriginAllowed
func (o *Options) IsOriginAllowed(origin string, req *http.Request) (allowed bool) { if o.ShouldAllowOrigin != nil { return o.ShouldAllowOrigin(origin, req) } for _, pattern := range allowOriginPatterns { allowed, _ = regexp.MatchString(pattern, origin) if allowed { return } } return }
go
func (o *Options) IsOriginAllowed(origin string, req *http.Request) (allowed bool) { if o.ShouldAllowOrigin != nil { return o.ShouldAllowOrigin(origin, req) } for _, pattern := range allowOriginPatterns { allowed, _ = regexp.MatchString(pattern, origin) if allowed { return } } return }
[ "func", "(", "o", "*", "Options", ")", "IsOriginAllowed", "(", "origin", "string", ",", "req", "*", "http", ".", "Request", ")", "(", "allowed", "bool", ")", "{", "if", "o", ".", "ShouldAllowOrigin", "!=", "nil", "{", "return", "o", ".", "ShouldAllowOr...
// Looks up if the origin matches one of the patterns // generated from Options.AllowOrigins patterns.
[ "Looks", "up", "if", "the", "origin", "matches", "one", "of", "the", "patterns", "generated", "from", "Options", ".", "AllowOrigins", "patterns", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/pkg/cors/cors.go#L106-L117
27,482
flynn/flynn
pkg/cors/cors.go
Handler
func (o *Options) Handler(next http.Handler) http.HandlerFunc { // Allow default headers if nothing is specified. if len(o.AllowHeaders) == 0 { o.AllowHeaders = defaultAllowHeaders } for _, origin := range o.AllowOrigins { pattern := regexp.QuoteMeta(origin) pattern = strings.Replace(pattern, "\\*", ".*", -1...
go
func (o *Options) Handler(next http.Handler) http.HandlerFunc { // Allow default headers if nothing is specified. if len(o.AllowHeaders) == 0 { o.AllowHeaders = defaultAllowHeaders } for _, origin := range o.AllowOrigins { pattern := regexp.QuoteMeta(origin) pattern = strings.Replace(pattern, "\\*", ".*", -1...
[ "func", "(", "o", "*", "Options", ")", "Handler", "(", "next", "http", ".", "Handler", ")", "http", ".", "HandlerFunc", "{", "// Allow default headers if nothing is specified.", "if", "len", "(", "o", ".", "AllowHeaders", ")", "==", "0", "{", "o", ".", "Al...
// Allows CORS for requests those match the provided options.
[ "Allows", "CORS", "for", "requests", "those", "match", "the", "provided", "options", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/pkg/cors/cors.go#L120-L145
27,483
flynn/flynn
appliance/postgresql/process.go
initDB
func (p *Process) initDB() error { log := p.log.New("fn", "initDB", "dir", p.dataDir) log.Debug("starting initDB") // ignore errors, since the db could be already initialized // TODO(titanous): check errors when this is not the case _ = p.runCmd(exec.Command( p.binPath("initdb"), "--pgdata", p.dataDir, "--u...
go
func (p *Process) initDB() error { log := p.log.New("fn", "initDB", "dir", p.dataDir) log.Debug("starting initDB") // ignore errors, since the db could be already initialized // TODO(titanous): check errors when this is not the case _ = p.runCmd(exec.Command( p.binPath("initdb"), "--pgdata", p.dataDir, "--u...
[ "func", "(", "p", "*", "Process", ")", "initDB", "(", ")", "error", "{", "log", ":=", "p", ".", "log", ".", "New", "(", "\"", "\"", ",", "\"", "\"", ",", "\"", "\"", ",", "p", ".", "dataDir", ")", "\n", "log", ".", "Debug", "(", "\"", "\"",...
// initDB initializes the postgres data directory for a new dDB. This can fail // if the db has already been initialized, which is not a fatal error. // // This method should only be called by the primary of a shard. Standbys will // not need to initialize, as they will restore from an already running primary.
[ "initDB", "initializes", "the", "postgres", "data", "directory", "for", "a", "new", "dDB", ".", "This", "can", "fail", "if", "the", "db", "has", "already", "been", "initialized", "which", "is", "not", "a", "fatal", "error", ".", "This", "method", "should",...
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/appliance/postgresql/process.go#L809-L824
27,484
flynn/flynn
host/downloader/downloader.go
DownloadConfig
func (d *Downloader) DownloadConfig(dir string) (map[string]string, error) { if err := os.MkdirAll(dir, 0755); err != nil { return nil, fmt.Errorf("error creating config dir: %s", err) } paths := make(map[string]string, len(config)) for _, conf := range config { path, err := d.downloadGzippedFile(conf, dir, fal...
go
func (d *Downloader) DownloadConfig(dir string) (map[string]string, error) { if err := os.MkdirAll(dir, 0755); err != nil { return nil, fmt.Errorf("error creating config dir: %s", err) } paths := make(map[string]string, len(config)) for _, conf := range config { path, err := d.downloadGzippedFile(conf, dir, fal...
[ "func", "(", "d", "*", "Downloader", ")", "DownloadConfig", "(", "dir", "string", ")", "(", "map", "[", "string", "]", "string", ",", "error", ")", "{", "if", "err", ":=", "os", ".", "MkdirAll", "(", "dir", ",", "0755", ")", ";", "err", "!=", "ni...
// DownloadConfig downloads the Flynn config files using the tuf client to the // given dir.
[ "DownloadConfig", "downloads", "the", "Flynn", "config", "files", "using", "the", "tuf", "client", "to", "the", "given", "dir", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/host/downloader/downloader.go#L69-L82
27,485
flynn/flynn
pkg/cluster/utils.go
ExtractHostID
func ExtractHostID(id string) (string, error) { ids := strings.SplitN(id, "-", 2) if len(ids) != 2 || ids[0] == "" || ids[1] == "" { return "", errors.New("invalid ID") } return ids[0], nil }
go
func ExtractHostID(id string) (string, error) { ids := strings.SplitN(id, "-", 2) if len(ids) != 2 || ids[0] == "" || ids[1] == "" { return "", errors.New("invalid ID") } return ids[0], nil }
[ "func", "ExtractHostID", "(", "id", "string", ")", "(", "string", ",", "error", ")", "{", "ids", ":=", "strings", ".", "SplitN", "(", "id", ",", "\"", "\"", ",", "2", ")", "\n", "if", "len", "(", "ids", ")", "!=", "2", "||", "ids", "[", "0", ...
// ExtractHostID returns the host ID component of a job ID, returning an error // if the given ID is invalid.
[ "ExtractHostID", "returns", "the", "host", "ID", "component", "of", "a", "job", "ID", "returning", "an", "error", "if", "the", "given", "ID", "is", "invalid", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/pkg/cluster/utils.go#L12-L18
27,486
flynn/flynn
pkg/cluster/utils.go
GenerateJobID
func GenerateJobID(hostID, uuid string) string { if uuid == "" { uuid = random.UUID() } return hostID + "-" + uuid }
go
func GenerateJobID(hostID, uuid string) string { if uuid == "" { uuid = random.UUID() } return hostID + "-" + uuid }
[ "func", "GenerateJobID", "(", "hostID", ",", "uuid", "string", ")", "string", "{", "if", "uuid", "==", "\"", "\"", "{", "uuid", "=", "random", ".", "UUID", "(", ")", "\n", "}", "\n", "return", "hostID", "+", "\"", "\"", "+", "uuid", "\n", "}" ]
// GenerateJobID returns a random job identifier, prefixed with the given host ID.
[ "GenerateJobID", "returns", "a", "random", "job", "identifier", "prefixed", "with", "the", "given", "host", "ID", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/pkg/cluster/utils.go#L31-L36
27,487
flynn/flynn
appliance/mongodb/process.go
waitForSync
func (p *Process) waitForSync(downstream *discoverd.Instance) { p.Logger.Debug("waiting for downstream sync") stopCh := make(chan struct{}) doneCh := make(chan struct{}) var once sync.Once p.cancelSyncWait = func() { once.Do(func() { close(stopCh); <-doneCh }) } go p.waitForSyncInner(downstream, stopCh, don...
go
func (p *Process) waitForSync(downstream *discoverd.Instance) { p.Logger.Debug("waiting for downstream sync") stopCh := make(chan struct{}) doneCh := make(chan struct{}) var once sync.Once p.cancelSyncWait = func() { once.Do(func() { close(stopCh); <-doneCh }) } go p.waitForSyncInner(downstream, stopCh, don...
[ "func", "(", "p", "*", "Process", ")", "waitForSync", "(", "downstream", "*", "discoverd", ".", "Instance", ")", "{", "p", ".", "Logger", ".", "Debug", "(", "\"", "\"", ")", "\n\n", "stopCh", ":=", "make", "(", "chan", "struct", "{", "}", ")", "\n"...
// waitForSync waits for downstream sync in goroutine
[ "waitForSync", "waits", "for", "downstream", "sync", "in", "goroutine" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/appliance/mongodb/process.go#L853-L865
27,488
flynn/flynn
appliance/mongodb/process.go
DialInfo
func (p *Process) DialInfo() *mgo.DialInfo { localhost := net.JoinHostPort("localhost", p.Port) info := &mgo.DialInfo{ Addrs: []string{localhost}, Timeout: 5 * time.Second, Direct: true, } if p.securityEnabled() { info.Addrs = []string{p.addr()} info.Database = "admin" info.Username = "flynn" info...
go
func (p *Process) DialInfo() *mgo.DialInfo { localhost := net.JoinHostPort("localhost", p.Port) info := &mgo.DialInfo{ Addrs: []string{localhost}, Timeout: 5 * time.Second, Direct: true, } if p.securityEnabled() { info.Addrs = []string{p.addr()} info.Database = "admin" info.Username = "flynn" info...
[ "func", "(", "p", "*", "Process", ")", "DialInfo", "(", ")", "*", "mgo", ".", "DialInfo", "{", "localhost", ":=", "net", ".", "JoinHostPort", "(", "\"", "\"", ",", "p", ".", "Port", ")", "\n", "info", ":=", "&", "mgo", ".", "DialInfo", "{", "Addr...
// DialInfo returns dial info for connecting to the local process as the "flynn" user.
[ "DialInfo", "returns", "dial", "info", "for", "connecting", "to", "the", "local", "process", "as", "the", "flynn", "user", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/appliance/mongodb/process.go#L868-L883
27,489
flynn/flynn
router/proxyproto/protocol.go
Read
func (p *conn) Read(b []byte) (int, error) { var err error p.initOnce.Do(func() { err = p.checkPrefix() }) if err != nil { return 0, err } if p.connBuf != nil { n := copy(b, p.connBuf) p.connBuf = p.connBuf[n:] if len(p.connBuf) == 0 { p.connBuf = nil } if len(b) == n { return n, nil } readN,...
go
func (p *conn) Read(b []byte) (int, error) { var err error p.initOnce.Do(func() { err = p.checkPrefix() }) if err != nil { return 0, err } if p.connBuf != nil { n := copy(b, p.connBuf) p.connBuf = p.connBuf[n:] if len(p.connBuf) == 0 { p.connBuf = nil } if len(b) == n { return n, nil } readN,...
[ "func", "(", "p", "*", "conn", ")", "Read", "(", "b", "[", "]", "byte", ")", "(", "int", ",", "error", ")", "{", "var", "err", "error", "\n", "p", ".", "initOnce", ".", "Do", "(", "func", "(", ")", "{", "err", "=", "p", ".", "checkPrefix", ...
// Read checks for the PROXY protocol header when doing the initial scan. If // there is an error parsing the header, it is returned and the socket is // closed.
[ "Read", "checks", "for", "the", "PROXY", "protocol", "header", "when", "doing", "the", "initial", "scan", ".", "If", "there", "is", "an", "error", "parsing", "the", "header", "it", "is", "returned", "and", "the", "socket", "is", "closed", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/router/proxyproto/protocol.go#L55-L74
27,490
flynn/flynn
logaggregator/aggregator.go
NewAggregator
func NewAggregator() *Aggregator { a := &Aggregator{ buffers: make(map[string]*buffer.Buffer), msgc: make(chan *rfc5424.Message, 1000), pausec: make(chan struct{}), } go a.run() return a }
go
func NewAggregator() *Aggregator { a := &Aggregator{ buffers: make(map[string]*buffer.Buffer), msgc: make(chan *rfc5424.Message, 1000), pausec: make(chan struct{}), } go a.run() return a }
[ "func", "NewAggregator", "(", ")", "*", "Aggregator", "{", "a", ":=", "&", "Aggregator", "{", "buffers", ":", "make", "(", "map", "[", "string", "]", "*", "buffer", ".", "Buffer", ")", ",", "msgc", ":", "make", "(", "chan", "*", "rfc5424", ".", "Me...
// NewAggregator creates a new running Aggregator.
[ "NewAggregator", "creates", "a", "new", "running", "Aggregator", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/logaggregator/aggregator.go#L22-L30
27,491
flynn/flynn
logaggregator/aggregator.go
Read
func (a *Aggregator) Read(id string) []*rfc5424.Message { return a.getBuffer(id).Read() }
go
func (a *Aggregator) Read(id string) []*rfc5424.Message { return a.getBuffer(id).Read() }
[ "func", "(", "a", "*", "Aggregator", ")", "Read", "(", "id", "string", ")", "[", "]", "*", "rfc5424", ".", "Message", "{", "return", "a", ".", "getBuffer", "(", "id", ")", ".", "Read", "(", ")", "\n", "}" ]
// Read returns the buffered messages for id.
[ "Read", "returns", "the", "buffered", "messages", "for", "id", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/logaggregator/aggregator.go#L49-L51
27,492
flynn/flynn
logaggregator/aggregator.go
ReadAll
func (a *Aggregator) ReadAll() [][]*rfc5424.Message { // TODO(benburkert): restructure Aggregator & ring.Buffer to avoid nested locks a.bmu.Lock() defer a.bmu.Unlock() buffers := make([][]*rfc5424.Message, 0, len(a.buffers)) for _, buf := range a.buffers { buffers = append(buffers, buf.Read()) } return buffe...
go
func (a *Aggregator) ReadAll() [][]*rfc5424.Message { // TODO(benburkert): restructure Aggregator & ring.Buffer to avoid nested locks a.bmu.Lock() defer a.bmu.Unlock() buffers := make([][]*rfc5424.Message, 0, len(a.buffers)) for _, buf := range a.buffers { buffers = append(buffers, buf.Read()) } return buffe...
[ "func", "(", "a", "*", "Aggregator", ")", "ReadAll", "(", ")", "[", "]", "[", "]", "*", "rfc5424", ".", "Message", "{", "// TODO(benburkert): restructure Aggregator & ring.Buffer to avoid nested locks", "a", ".", "bmu", ".", "Lock", "(", ")", "\n", "defer", "a...
// ReadAll returns all buffered messages.
[ "ReadAll", "returns", "all", "buffered", "messages", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/logaggregator/aggregator.go#L54-L65
27,493
flynn/flynn
logaggregator/aggregator.go
ReadAndSubscribe
func (a *Aggregator) ReadAndSubscribe(id string, msgc chan<- *rfc5424.Message, donec <-chan struct{}) []*rfc5424.Message { return a.getBuffer(id).ReadAndSubscribe(msgc, donec) }
go
func (a *Aggregator) ReadAndSubscribe(id string, msgc chan<- *rfc5424.Message, donec <-chan struct{}) []*rfc5424.Message { return a.getBuffer(id).ReadAndSubscribe(msgc, donec) }
[ "func", "(", "a", "*", "Aggregator", ")", "ReadAndSubscribe", "(", "id", "string", ",", "msgc", "chan", "<-", "*", "rfc5424", ".", "Message", ",", "donec", "<-", "chan", "struct", "{", "}", ")", "[", "]", "*", "rfc5424", ".", "Message", "{", "return"...
// Read returns the buffered messages and adds a subscriber channel for id.
[ "Read", "returns", "the", "buffered", "messages", "and", "adds", "a", "subscriber", "channel", "for", "id", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/logaggregator/aggregator.go#L68-L70
27,494
flynn/flynn
logaggregator/aggregator.go
Reset
func (a *Aggregator) Reset() { a.bmu.Lock() defer a.bmu.Unlock() for k, buf := range a.buffers { buf.Close() delete(a.buffers, k) } }
go
func (a *Aggregator) Reset() { a.bmu.Lock() defer a.bmu.Unlock() for k, buf := range a.buffers { buf.Close() delete(a.buffers, k) } }
[ "func", "(", "a", "*", "Aggregator", ")", "Reset", "(", ")", "{", "a", ".", "bmu", ".", "Lock", "(", ")", "\n", "defer", "a", ".", "bmu", ".", "Unlock", "(", ")", "\n\n", "for", "k", ",", "buf", ":=", "range", "a", ".", "buffers", "{", "buf",...
// Reset clears all buffered data and closes subscribers.
[ "Reset", "clears", "all", "buffered", "data", "and", "closes", "subscribers", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/logaggregator/aggregator.go#L73-L81
27,495
flynn/flynn
logaggregator/aggregator.go
Subscribe
func (a *Aggregator) Subscribe(id string, msgc chan<- *rfc5424.Message, donec <-chan struct{}) { a.getBuffer(id).Subscribe(msgc, donec) }
go
func (a *Aggregator) Subscribe(id string, msgc chan<- *rfc5424.Message, donec <-chan struct{}) { a.getBuffer(id).Subscribe(msgc, donec) }
[ "func", "(", "a", "*", "Aggregator", ")", "Subscribe", "(", "id", "string", ",", "msgc", "chan", "<-", "*", "rfc5424", ".", "Message", ",", "donec", "<-", "chan", "struct", "{", "}", ")", "{", "a", ".", "getBuffer", "(", "id", ")", ".", "Subscribe"...
// Read adds a subscriber channel for id.
[ "Read", "adds", "a", "subscriber", "channel", "for", "id", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/logaggregator/aggregator.go#L91-L93
27,496
flynn/flynn
gitreceive/server.go
pktLine
func pktLine(w io.Writer, s string) error { _, err := fmt.Fprintf(w, "%04x%s", len(s)+4, s) return err }
go
func pktLine(w io.Writer, s string) error { _, err := fmt.Fprintf(w, "%04x%s", len(s)+4, s) return err }
[ "func", "pktLine", "(", "w", "io", ".", "Writer", ",", "s", "string", ")", "error", "{", "_", ",", "err", ":=", "fmt", ".", "Fprintf", "(", "w", ",", "\"", "\"", ",", "len", "(", "s", ")", "+", "4", ",", "s", ")", "\n", "return", "err", "\n...
// Git HTTP line protocol functions
[ "Git", "HTTP", "line", "protocol", "functions" ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/gitreceive/server.go#L268-L271
27,497
flynn/flynn
appliance/redis/cmd/flynn-redis-api/main.go
NewHandler
func NewHandler() *Handler { h := &Handler{ router: httprouter.New(), Logger: log15.New(), } h.router.POST("/clusters", h.servePostCluster) h.router.DELETE("/clusters", h.serveDeleteCluster) h.router.GET("/ping", h.serveGetPing) return h }
go
func NewHandler() *Handler { h := &Handler{ router: httprouter.New(), Logger: log15.New(), } h.router.POST("/clusters", h.servePostCluster) h.router.DELETE("/clusters", h.serveDeleteCluster) h.router.GET("/ping", h.serveGetPing) return h }
[ "func", "NewHandler", "(", ")", "*", "Handler", "{", "h", ":=", "&", "Handler", "{", "router", ":", "httprouter", ".", "New", "(", ")", ",", "Logger", ":", "log15", ".", "New", "(", ")", ",", "}", "\n", "h", ".", "router", ".", "POST", "(", "\"...
// NewAPIHandler returns a new instance of APIHandler.
[ "NewAPIHandler", "returns", "a", "new", "instance", "of", "APIHandler", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/appliance/redis/cmd/flynn-redis-api/main.go#L169-L178
27,498
flynn/flynn
pkg/cluster/host.go
NewHost
func NewHost(id string, addr string, h *http.Client, tags map[string]string) *Host { if h == nil { h = http.DefaultClient } if !strings.HasPrefix(addr, "http") { addr = "http://" + addr } return &Host{ id: id, tags: tags, c: &httpclient.Client{ ErrNotFound: ErrNotFound, URL: addr, HTTP...
go
func NewHost(id string, addr string, h *http.Client, tags map[string]string) *Host { if h == nil { h = http.DefaultClient } if !strings.HasPrefix(addr, "http") { addr = "http://" + addr } return &Host{ id: id, tags: tags, c: &httpclient.Client{ ErrNotFound: ErrNotFound, URL: addr, HTTP...
[ "func", "NewHost", "(", "id", "string", ",", "addr", "string", ",", "h", "*", "http", ".", "Client", ",", "tags", "map", "[", "string", "]", "string", ")", "*", "Host", "{", "if", "h", "==", "nil", "{", "h", "=", "http", ".", "DefaultClient", "\n...
// NewHost creates a new Host that uses client to communicate with it. // addr is used by Attach.
[ "NewHost", "creates", "a", "new", "Host", "that", "uses", "client", "to", "communicate", "with", "it", ".", "addr", "is", "used", "by", "Attach", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/pkg/cluster/host.go#L30-L46
27,499
flynn/flynn
pkg/cluster/host.go
ListJobs
func (c *Host) ListJobs() (map[string]host.ActiveJob, error) { var jobs map[string]host.ActiveJob err := c.c.Get("/host/jobs", &jobs) return jobs, err }
go
func (c *Host) ListJobs() (map[string]host.ActiveJob, error) { var jobs map[string]host.ActiveJob err := c.c.Get("/host/jobs", &jobs) return jobs, err }
[ "func", "(", "c", "*", "Host", ")", "ListJobs", "(", ")", "(", "map", "[", "string", "]", "host", ".", "ActiveJob", ",", "error", ")", "{", "var", "jobs", "map", "[", "string", "]", "host", ".", "ActiveJob", "\n", "err", ":=", "c", ".", "c", "....
// ListJobs lists all jobs on the host.
[ "ListJobs", "lists", "all", "jobs", "on", "the", "host", "." ]
b4b05fce92da5fbc53b272362d87b994b88a3869
https://github.com/flynn/flynn/blob/b4b05fce92da5fbc53b272362d87b994b88a3869/pkg/cluster/host.go#L93-L97