View dump_k8s.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# set -x | |
mkdir output | |
KUBECONFIG=/Users/nico/real-kubeconfig | |
SKIP_RESOURCES=( | |
apiservices | |
bindings |
View writer.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule KinesisWriter.Writer do | |
@type t :: %__MODULE__{ | |
aggregator: ExKpl.t(), | |
client: module(), | |
client_opts: Keyword.t() | |
} | |
defstruct aggregator: ExKpl.new(), | |
client: KinesisWriter.Client, | |
client_opts: [] |
View worker.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule KinesisServer.Worker do | |
use GenServer | |
alias KinesisServer.Writer | |
def start_link(opts \\ []) do | |
GenServer.start_link(__MODULE__, Writer.new(opts)) | |
end | |
@impl true | |
def init(init_arg) do |
View application.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule KinesisWriter do | |
use Application | |
def start(_type, _args) do | |
children = [ | |
:poolboy.child_spec( | |
:kinesis_writer_pool, | |
[ | |
name: {:local, :kinesis_writer_pool}, | |
worker_module: KinesisWriter.Worker, |