View Source Lightning.Scrubber (Lightning v2.10.4)

Process used to scrub strings of sensitive information.

Can be started via start_link/1.

{:ok, scrubber} =
  Lightning.Scrubber.start_link(
    samples:
      Lightning.Credentials.sensitive_values_for(credential)
  )

Takes an optional :name key, in case you need to name the process.

Summary

Functions

Returns a specification to start this module under a supervisor.

Prepare a list of sensitive samples (strings) into a potentially bigger list composed of variations a sample may appear.

Functions

Link to this function

add_samples(agent, new_samples, basic_auth)

View Source

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

encode_samples(samples, basic_auth \\ [])

View Source
@spec encode_samples(samples :: [String.t()], basic_auth :: [String.t()]) :: [
  String.t()
]

Prepare a list of sensitive samples (strings) into a potentially bigger list composed of variations a sample may appear.

@spec start_link(
  opts :: [
    samples: [String.t()],
    basic_auth: [String.t()],
    name: nil | GenServer.name()
  ]
) :: Agent.on_start()