diff --git a/README.md b/README.md index ab8b89c..1014b19 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ -# cheetah +# kawa -cheetah is an opinionated framework for scalable, reliable stream processing. +kawa is an opinionated framework for scalable, reliable stream processing. -# cheetahd - -cheetahd is a daemon for collecting system logs and metrics which makes is powered -by cheetah. +kawa also provides a daemon for collecting system logs and metrics. # Installation @@ -18,7 +15,7 @@ working set of APIs, interfaces and data models. # TODO -- Ensure that consumers of cheetah aren't subject to all the dependencies of cheetahd. +- Ensure that consumers of kawa aren't subject to all the dependencies of kawad. - Consider breaking apart the library from the daemon. # Source Wishlist diff --git a/cmd/cheetahd/config.go b/cmd/kawa/config.go similarity index 100% rename from cmd/cheetahd/config.go rename to cmd/kawa/config.go diff --git a/cmd/cheetahd/main.go b/cmd/kawa/main.go similarity index 92% rename from cmd/cheetahd/main.go rename to cmd/kawa/main.go index ad2b8c3..6d40748 100644 --- a/cmd/cheetahd/main.go +++ b/cmd/kawa/main.go @@ -29,7 +29,7 @@ func init() { return a } level := slog.LevelInfo - if _, ok := os.LookupEnv("CHEETAH_DEBUG"); ok { + if _, ok := os.LookupEnv("KAWA_DEBUG"); ok { level = slog.LevelDebug } @@ -49,8 +49,8 @@ func init() { func main() { slog.Info(fmt.Sprintf("starting %s", path.Base(os.Args[0])), "version", version) rootCmd := NewRootCommand() - cheetahdCmd := NewRunCommand() - rootCmd.AddCommand(cheetahdCmd) + kawaCmd := NewRunCommand() + rootCmd.AddCommand(kawaCmd) if err := rootCmd.Execute(); err != nil { slog.Error(fmt.Sprintf("%+v", err)) @@ -62,8 +62,8 @@ func main() { func NewRootCommand() *cobra.Command { rootCmd := &cobra.Command{ Use: path.Base(os.Args[0]), - Short: `cheetahd is an all-in-one event ingestion daemon`, - Long: `cheetahd is an all-in-one event ingestion daemon. + Short: `kawa is an all-in-one event ingestion daemon`, + Long: `kawa is an all-in-one event ingestion daemon. It is designed to be a single binary that can be deployed to a server and configured to receive events from a variety of sources and send them to a variety of destinations.`, diff --git a/internal/destinations/runreveal/runreveal.go b/internal/destinations/runreveal/runreveal.go index 48cbf6f..18a2adf 100644 --- a/internal/destinations/runreveal/runreveal.go +++ b/internal/destinations/runreveal/runreveal.go @@ -57,7 +57,7 @@ func (r *RunReveal) Run(ctx context.Context) error { r.reqConf = func(rb *requests.Builder) { rb. - UserAgent("cheetahd"). + UserAgent("kawa"). Accept("application/json"). BaseURL(r.webhookURL). Header("Content-Type", "application/json") diff --git a/types.go b/types.go index d303412..f2ebcc2 100644 --- a/types.go +++ b/types.go @@ -29,7 +29,7 @@ type Attributes interface { Unwrap() Attributes } -// Source defines the abstraction for which chta consumes or receives messages +// Source defines the abstraction for which kawa consumes or receives messages // from an external entity. Most notable implementations are queues (Kafka, // RabbitMQ, Redis), but anything which is message oriented could be made into // a source (e.g. a newline-delimited-JSON file could conceivably be a source). diff --git a/x/batcher/batcher.go b/x/batcher/batcher.go index f9bdd96..07908c4 100644 --- a/x/batcher/batcher.go +++ b/x/batcher/batcher.go @@ -184,12 +184,12 @@ func (d *Destination[T]) flush(ctx context.Context) error { } func (d *Destination[T]) doflush(ctx context.Context, msgs []msgAck[T]) { - chtaMsgs := make([]kawa.Message[T], 0, len(msgs)) + kawaMsgs := make([]kawa.Message[T], 0, len(msgs)) for _, m := range msgs { - chtaMsgs = append(chtaMsgs, m.msg) + kawaMsgs = append(kawaMsgs, m.msg) } - err := d.flusher.Flush(ctx, chtaMsgs) + err := d.flusher.Flush(ctx, kawaMsgs) if err != nil { d.flusherr <- err d.flushwg.Done()