utils

package
v0.0.0-...-dd67137 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KubeBurst = 10
View Source
var KubeContentType = "application/vnd.kubernetes.protobuf"
View Source
var KubeMaster = ""
View Source
var KubeQPS = float32(5.000000)
View Source
var Kubeconfig = ""

Functions

func GetTwitterClient

func GetTwitterClient(creds *Credentials) (*twitter.Client, error)

GetTwitterClient is a helper function that will return a twitter client that we can subsequently use to stream new tweets this will take in a pointer to a Credential struct which will contain everything needed to authenticate and return a pointer to a twitter Client or an error

func KubeConfig

func KubeConfig() (conf *rest.Config, err error)

KubeConfig from flags

func NewCRDClient

func NewCRDClient(cfg *rest.Config) (*rest.RESTClient, error)

NewCRDClient is used to create a restClient for crd

func ReadSecretKey

func ReadSecretKey(key string) (string, error)

ReadSecretKey is a helper function that will return the value of the key passed in as an argument. The keys in this case are secrets containing the Twitter credentials for authentication.

Types

type Credentials

type Credentials struct {
	ConsumerKey       string
	ConsumerSecret    string
	AccessToken       string
	AccessTokenSecret string
}

Credentials stores all of our access/consumer tokens and secret keys needed for authentication against the twitter REST API.

Jump to

Keyboard shortcuts

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