class Funko::Funko

Included Modules

Defined in:

funko.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]

Class Method Detail

def self.from_docker : Array(Funko) #

Get all the funkos docker knows about.


[View source]
def self.from_names(names : Array(String)) : Array(Funko) #

Create an array of funkos just from names. These are limited in function and can't call #prepare_build or some other functionality


[View source]
def self.from_paths(paths : Array(String | Path)) : Array(Funko) #

Create an Array of funkos from an Array of folders containing definitions


[View source]

Instance Method Detail

def after_initialize #

[View source]
def build(path : Path, no_cache : Bool = false, _name : String | Nil = nil) #

Build image using docker in path previously prepared using #prepare_build


[View source]
def containers(status : String | Nil = "running") #

Get all containers related to this funko in the desired state


[View source]
def create_container : String #

Create a container for this funko


[View source]
def docker_status #

A comprehensive status for the funko:


[View source]
def image_history #

Return a list of image IDs for this funko, most recent first


[View source]
def images #

[View source]
def latest_image #

[View source]
def name : String #

Required, the name of the funko. Must be unique across FaaSO


[View source]
def name=(name : String) #

Required, the name of the funko. Must be unique across FaaSO


[View source]
def options : Hash(String, String | Array(String)) #

[View source]
def options=(options : Hash(String, String | Array(String))) #

[View source]
def path : String #

Where this is located in the filesystem


[View source]
def path=(path : String) #

Where this is located in the filesystem


[View source]
def prepare_build(path : Path) #

Setup the target directory #path with all the files needed to build a docker image


[View source]
def remove_all_containers #

Remove all containers related to this funko


[View source]
def remove_all_images #

Remove all images related to this funko


[View source]
def runtime : String | Nil | Nil #

if Nil, it has no template whatsoever


[View source]
def runtime=(runtime : String | Nil | Nil) #

if Nil, it has no template whatsoever


[View source]
def scale(new_scale : Int) : Array(String) #

Set the number of running instances of this funko Returns the list of IDs started or stopped


[View source]
def scale #

Get the number of running instances of this funko


[View source]
def scale=(scale : Int32) #

Scale: how many instances of this funko should be running


[View source]
def start(id : String) #

Start container with given id


[View source]
def valid? : Bool #

[View source]
def wait_for(new_scale : Int, t : Int, healthy : Bool = false) #

Wait up to t seconds for the funko to reach the desired scale If healthy is true, it will wait for the container to be declared healthy by the healthcheck


[View source]
def wait_for_container_started(id : String, t : Int) #

[View source]