github

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UserID is key of GitHub user ID in secret
	UserID = "user"
	// AccessToken is key of GitHub user password or personal token in secret
	AccessToken = "accessToken"
	// Path is the key of GitHub package filter config map
	Path = "path"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, hubconfig *rest.Config, syncid *types.NamespacedName, syncinterval int) error

Add does nothing for namespace subscriber, it generates cache for each of the item

func GetDefaultSubscriber

func GetDefaultSubscriber() appv1alpha1.Subscriber

GetDefaultSubscriber - returns the defajlt namespace subscriber

Types

type Subscriber

type Subscriber struct {
	// contains filtered or unexported fields
}

Subscriber - information to run namespace subscription

func CreateGitHubSubscriber

func CreateGitHubSubscriber(config *rest.Config, scheme *runtime.Scheme, mgr manager.Manager,
	kubesync *kubesynchronizer.KubeSynchronizer, syncinterval int) *Subscriber

CreateGitHubSubscriber - create github subscriber with config to hub cluster, scheme of hub cluster and a syncrhonizer to local cluster

func (*Subscriber) SubscribeItem

func (ghs *Subscriber) SubscribeItem(subitem *appv1alpha1.SubscriberItem) error

SubscribeItem subscribes a subscriber item with namespace channel

func (*Subscriber) UnsubscribeItem

func (ghs *Subscriber) UnsubscribeItem(key types.NamespacedName) error

UnsubscribeItem uhrsubscribes a namespace subscriber item

type SubscriberItem

type SubscriberItem struct {
	appv1.SubscriberItem
	// contains filtered or unexported fields
}

SubscriberItem - defines the unit of namespace subscription

func (*SubscriberItem) Start

func (ghsi *SubscriberItem) Start()

Start subscribes a subscriber item with github channel

func (*SubscriberItem) Stop

func (ghsi *SubscriberItem) Stop()

Stop unsubscribes a subscriber item with namespace channel

Jump to

Keyboard shortcuts

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