PhoenixGenApi.ConfigPuller (PhoenixGenApi v0.0.13)

View Source

This is automation module for pull %FunConfig{} from nodes and update to cache.

Configs for Pullter can be set in config file like:

config :phoenix_gen_api, :gen_api,
pull_timeout: 3_000,
pull_interval: 60_000

default timeout is 5s, refresh time is 30s.

Summary

Functions

Add nodes to pull config from. Nodes is a list of %ServiceConfig{}.

Returns a specification to start this module under a supervisor.

Delete services from pull config from. Nodes is a list of %ServiceConfig{}.

Get api list from node.

Get nodes that will be pulled config from.

Force pull config from nodes.

Functions

add(services)

Add nodes to pull config from. Nodes is a list of %ServiceConfig{}.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

delete(services)

Delete services from pull config from. Nodes is a list of %ServiceConfig{}.

get_api_list(service)

Get api list from node.

get_services()

Get nodes that will be pulled config from.

pull()

Force pull config from nodes.

start_link(opts \\ [])