stream

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 7 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")
		}

		s, err := client.StreamAnonymizersFeed(flags.query, nil)
		if err != nil {
			timber.Fatal(err, "failed to stream anonymizer feed")
		}
		defer func() { _ = s.Close() }()

		_, err = io.Copy(os.Stdout, s)
		if err != nil {
			timber.Fatal(err, "failed to copy stream to stdout")
		}
	},
}

Functions

func AnonymizerQueryFlags

func AnonymizerQueryFlags(cmd *cobra.Command, query *synthient.AnonymizersQuery)

Types

This section is empty.

Jump to

Keyboard shortcuts

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