utils

package
v0.0.0-...-b1a8189 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 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 = "http://192.168.43.119:8080"

replace this with the K8s Master IP

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