utils

package
v0.0.0-...-a06ed9b Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(address *net.TCPAddr, timeout time.Duration) error

Check ports whether is open

func IsPortOpen

func IsPortOpen(port int) bool

IsPortOpen returns true if port is open

func NewRedisClient

func NewRedisClient() *redis.Client

NewRedisClient creates a new redis client

func RedisPort

func RedisPort() int

RedisPort is the default port

Types

type DeadlineActionFunc

type DeadlineActionFunc func(success chan<- struct{}, terminate <-chan struct{})

DeadlineActionFunc is a function called by enforcer

type DeadlineEnforcer

type DeadlineEnforcer struct {
	// Action that enforcec end
	Action DeadlineActionFunc
}

DeadlineEnforcer encforces deadlines

func (DeadlineEnforcer) DoWithin

func (deadlineEnforcer DeadlineEnforcer) DoWithin(duration time.Duration) error

DoWithin do with duration

type RedisRunner

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

RedisRunner runs redis server

func (*RedisRunner) Start

func (runner *RedisRunner) Start(redisArgs ...string) error

Start starts the server

func (*RedisRunner) Stop

func (runner *RedisRunner) Stop() error

Stop stops the server

Jump to

Keyboard shortcuts

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