Skip to content

RedHatInsights/sources-superkey-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

53b09f6 · Jan 10, 2025
Jan 10, 2025
Dec 9, 2024
Jul 1, 2021
Jan 26, 2024
Apr 23, 2024
Sep 6, 2024
May 31, 2024
Jul 20, 2023
Oct 3, 2022
Jul 28, 2022
Jul 21, 2023
Feb 1, 2021
Mar 24, 2021
Jan 29, 2021
Sep 6, 2024
Nov 4, 2022
Jul 17, 2022
Mar 25, 2021
Dec 11, 2024
Dec 11, 2024
Oct 1, 2024
Jan 7, 2022

Repository files navigation

Sources SuperKey Worker

This is the worker that will run and process the superkey creation steps. Consumes messages off of a topic and creates required resources in AWS or any other provider (currently only AWS is supported)

Makefile

To build: make

To build the container: make container

To run locally: make run

To run in the container: make runcontainer

Layout

Folder description
amazon/ aws api client files for s3, iam, etc
config/ config setup in a struct
logger/ <self explanatory>
messaging/ kafka client
sources/ sources api client wrapper
provider/ interface & structs for various providers
util/ various utilities for producing messages etc
Containerfile container spec with builder image, based on UBI
worker.go the listener worker
main.go how to GO!
General info

struct definitions are in types.go files, methods on said structs are divided into other files or in the same file if they don't belong anywhere else.

Detailed Layout Info
  • amazon:
    The amazon/ folder contains the api client in iam.go, s3.go and reporting.go. The credentials.go file contains methods on the Amazon Client struct to create a new AWS API Client.

  • messaging: Currently only a couple functions:

    • Consumer(topic) to return a consumer
    • ConsumeWithFunction(topic, func) that takes a topic and applies a function on each message that comes through said topic.
  • provider: The meat and potatoes of where the application creation happens, interfaces + structs are in types.go.

    • forge.go is where the provider gets instantiated based on request type
    • amazon_provider.go the current only implemented superkey provider. This file contains the logic to actually create the superkey request based on a request that comes through kafka.

License

This project is available as open source under the terms of the Apache License 2.0.