Hexoku.API.Dynos

Dynos encapsulate running processes of an app on Heroku.

Attributes

id
unique identifier of item generated by Heroku
name
the name of this process on this dyno
attach_url
a URL to stream output from for attached processes or null for non-attached processes
command
command used to start this process
release:id
unique identifier of release
release:version
unique version assigned to the release
size
dyno size (default: "1X")
state
current status of process [crashed, down, idle, starting, up]
type
type of process
created_at
when item was created
updated_at
when item was last modified

For more info read the Heroku API Reference

Source

Summary

create(client, app, command, options \\ %{})

Create a new dyno

info(client, app, dyno)

Info for existing dyno

list(client, app)

List existing dynos

restart(client, app, dyno)

Restart specific dyno

restart_all(client, app)

Restart all dynos

Functions

create(client, app, command, options \\ %{})

Specs:

  • create(Hexoku.Client.t, binary, binary, Map.t) :: Map.t

Create a new dyno.

Payload Attributes

command required
command used to start this process
attach
whether to stream output or not
env
Dict of vars to add to the dyno config vars
size
dyno size (default: "1X")

Examples

client |> Hexoku.API.Dynos.create("myapp", %{
    command: "mix test",
    env: %{"MIX_ENV": "test"}
})
Source
info(client, app, dyno)

Specs:

  • info(Hexoku.Client.t, binary, binary) :: Map.t

Info for existing dyno.

Examples

client |> Hexoku.API.Dynos.info("myapp", "web.1")
Source
list(client, app)

Specs:

  • list(Hexoku.Client.t, binary) :: [Map.t]

List existing dynos.

Examples

client |> Hexoku.API.Dynos.list("myapp")
Source
restart(client, app, dyno)

Specs:

  • restart(Hexoku.Client.t, binary, binary) :: Map.t

Restart specific dyno.

Examples

client |> Hexoku.API.Dynos.restart("myapp", "web.1")
Source
restart_all(client, app)

Specs:

  • restart_all(Hexoku.Client.t, binary) :: Map.t

Restart all dynos.

Examples

client |> Hexoku.API.Dynos.restart_all("myapp")
Source