counter

package
v0.0.0-...-3a64001 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheClient

type CacheClient interface {
	Get(key string) (string, error)
	Set(key, value string) error
}

CacheClient modelates a Cache Service

func NewRedisClient

func NewRedisClient(clientAddr string) CacheClient

NewRedisClient returns a CacheClient backed in Redis

type Server

type Server interface {
	Run() error
}

Server is the HTTP server with the counter functionality

func NewServer

func NewServer(cacheClient CacheClient, port, instanceName string) Server

NewServer returns the Server

Jump to

Keyboard shortcuts

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