util

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FanIn added in v1.6.0

func FanIn(done <-chan interface{}, channels ...<-chan interface{}) chan interface{}

FanIn FanIn

func GetMaximumPartitionKeyToDelete

func GetMaximumPartitionKeyToDelete(purgeRecordsOlderThanDays int) string

GetMaximumPartitionKeyToDelete TicksAscendingWithLeadingZero

func LogPeriods

func LogPeriods(splits []Period)

func Repeat added in v1.6.0

func Repeat(done <-chan interface{}, values ...interface{}) <-chan interface{}

Repeat repeat

func RepeatFn added in v1.6.0

func RepeatFn(done <-chan interface{}, fn func() interface{}) <-chan interface{}

RepeatFn repeat with function

func SenderWithLogging

func SenderWithLogging(s storage.Sender) storage.Sender

SenderWithLogging returns a SendDecorator that implements simple before and after logging of the request.

func Take added in v1.6.0

func Take(done <-chan interface{}, valueStream <-chan interface{}, num int) <-chan interface{}

Take Take

func TicksAscendingWithLeadingZero

func TicksAscendingWithLeadingZero(ticks int64) string

TicksAscendingWithLeadingZero asdf

func TicksFromTime

func TicksFromTime(t time.Time) int64

TicksFromTime converts time to ticks

func TicksFromTime2

func TicksFromTime2(t time.Time) int64

TicksFromTime2 converts time to ticks

func TimeFromTicks

func TimeFromTicks(ticks int64) time.Time

TimeFromTicks convert ticks to time

func TimeFromTicksAscendingWithLeadingZero

func TimeFromTicksAscendingWithLeadingZero(ticksStr string) time.Time

Types

type Period

type Period struct {
	Start time.Time
	End   time.Time
}

Period represet a period iof time

func NewPeriod

func NewPeriod(start, end time.Time) (*Period, error)

NewPeriod creates a new period instance

func ParsePeriod added in v1.4.0

func ParsePeriod(start, end string) (*Period, error)

ParsePeriod parse RFC3339 formated strings into Period

func (*Period) Duration

func (p *Period) Duration() time.Duration

Duration the Periods's time.Duration

func (*Period) Split

func (p *Period) Split(duration time.Duration) []Period

func (*Period) SplitsFrom

func (p *Period) SplitsFrom(numSplits int) []Period

SplitsFrom dsfg

func (Period) String

func (p Period) String() string

type SenderFunc

type SenderFunc func(c *storage.Client, r *http.Request) (*http.Response, error)

SenderFunc is a method that implements the Sender interface.

func (SenderFunc) Send

func (sf SenderFunc) Send(c *storage.Client, r *http.Request) (*http.Response, error)

Send implements the Sender interface on SenderFunc.

Jump to

Keyboard shortcuts

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