hbcache

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Depends on godynamo. Please refer to that package for how to configure * this package. * * The dynamo table we use has the following structure: * Primary Hash key: hostname * No range key * No secondary indexes. * columns: * Mtime - last access time * Status - status return value * Data - memory dump string * Error - error string value *

Index

Constants

This section is empty.

Variables

View Source
var CACHE_TAB = "Heartbleed"

Functions

func Init

func Init(expiration string)

Initialize the cache layer. * expiration - Go standard duration string, defaults to '10m'

func Set

func Set(host string, state int, data, errS string) error

Set the state of the host in the cache *

Types

type CacheReply

type CacheReply struct {
	Host       string
	LastUpdate int64
	Status     int64
	Data       string
	Error      string
}

func Check

func Check(host string) (CacheReply, bool)

Fetch the record from the Cache. * * returns the record and if the record should be considered "OK" to use. * An OK record is a valid, non-expired cache stored entry.

Jump to

Keyboard shortcuts

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