cache

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package cache provides access to a shared in-memory object cache for the endpoints

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

type Endpoints struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Endpoints shared object that holds our cache of the endpoints. Requires the use of the RWMutex for locking.

func (*Endpoints) GetEndpoints

func (e *Endpoints) GetEndpoints() *v1.Endpoints

GetEndpoints gets the endpoints out of the cache

func (*Endpoints) GetLastUpdated

func (e *Endpoints) GetLastUpdated() time.Time

GetLastUpdated gets the time of the last update to the cache

func (*Endpoints) SetEndpoints

func (e *Endpoints) SetEndpoints(endpoints *v1.Endpoints)

SetEndpoints sets the endpoints on the cache

func (*Endpoints) Update

func (e *Endpoints) Update(endpointsEvents chan *v1.Endpoints)

Update watches a channel and updates the endpoints as items are pushed to the channel

Jump to

Keyboard shortcuts

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