util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForwardInBackground

func ForwardInBackground(prefix string, source <-chan string, target chan<- []string) func()

Forwards messages from source channel to target channnel with prefix Target <- <Prefix> + Source Return func could be used to forward remaining messages to the output channel before closing it Example:

defer close(target)
source := someFunc()
defer util.ForwardInBackground("Prefix", source, target)()

func JoinChannels

func JoinChannels(a <-chan []string, b <-chan []string) <-chan []string

Concatenate two channels in async way, i.e., any message comming from a or b passes to result without any change

func MakeImage

func MakeImage(dir string, desc *TestDescription, imageNameVersion string) error

func RemoveTimestampAndRequestIdFromAwsLogLine

func RemoveTimestampAndRequestIdFromAwsLogLine(line, requestId string) (string, bool)

func RemoveTimestampAndRequestIdFromIronLogLine

func RemoveTimestampAndRequestIdFromIronLogLine(line, requestId string) (string, bool)

Types

type Semaphore

type Semaphore chan empty

func NewSemaphore

func NewSemaphore(size int) Semaphore

func (Semaphore) Available

func (s Semaphore) Available() int

func (Semaphore) Lock

func (s Semaphore) Lock()

func (Semaphore) Size

func (s Semaphore) Size() int

func (Semaphore) Unlock

func (s Semaphore) Unlock()

type TestDescription

type TestDescription struct {
	Handler     string
	Name        string
	Runtime     string
	Event       interface{}
	Description string // Completely ignored by test harness, just useful to convey intent of test.

	// The test's timeout in seconds, valid timeout as imposed by Lambda
	// is between 1 and 300 inclusive.
	// If no Timeout is specified the 60 sec default is used
	Timeout int
}

func ReadTestDescription

func ReadTestDescription(dir string) (*TestDescription, error)

Jump to

Keyboard shortcuts

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