stream

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "stream",
	Short: "Stream anonymizer feed to stdout",
	Run: func(cmd *cobra.Command, args []string) {
		config, err := conf.Read()
		if err != nil {
			timber.Fatal(err, "failed to read configuration file")
		}

		client, err := auth.SynthientClient(config)
		if err != nil {
			timber.Fatal(err, "failed to create synthient client")
		}

		enc := json.NewEncoder(os.Stdout)
		for event, err := range client.StreamAnonymizer(nil) {
			if err != nil {
				timber.Fatal(err, "failed to stream anonymizer feed")
			}
			err = enc.Encode(event)
			if err != nil {
				timber.Fatal(err, "failed to encode anonymizer event")
			}
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL