generic

package
v0.0.0-...-700dddc Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2018 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChCounter

type ChCounter struct {
	Outputs chan int
	// contains filtered or unexported fields
}

ChCounter is an atomic counter that requires users to get the value via subscribing to an outputs channel.

type Counter

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

Counter struct that concurrent incrementing integer.

func (*Counter) Get

func (counter *Counter) Get() int

Get returns the current value of the counter

func (*Counter) GetAndIncrement

func (counter *Counter) GetAndIncrement() int

GetAndIncrement increments the counter and then immediately returns it

func (*Counter) Reset

func (counter *Counter) Reset()

Reset sets the counter back to 0

type RequestComponents

type RequestComponents struct {
	URL    string
	Body   interface{}
	Header req.Header
	Params req.Param
}

RequestComponents is an abstraction over the components to be send for a post request.

func (*RequestComponents) Post

func (reqComponents *RequestComponents) Post() (*req.Resp, error)

Post the request components.

Jump to

Keyboard shortcuts

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