redisbee

package
v0.4.1-0...-d636b69 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

README

Redis bee

Store arbitrary key/value strings in a Redis server.

Configuration

  • host: Redis host (defaults to localhost)
  • port: Redis port (defaults to 6379)
  • password: Redis server password (defaults to passwordless auth)
  • db: Redis database to use (defaults to 0)
  • channel: Redis channel to subscribe to (pubsub disabled if not specified)

Ideas

  • Use it in combination with the ipify hive to store your public IP history
  • Store URLs sent via POST to the HTTP server hive
  • Store all messages received in a Slack channel using the Slack hive

See beehive-youtube-dl, a sample project that combines multiple hives, including this one.

Credits

Redis Icon by Icon Mafia on [Iconscout]](https://iconscout.com)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisBee

type RedisBee struct {
	bees.Bee
	// contains filtered or unexported fields
}

RedisBee is able to pubsub to Redis and store key/values

func (*RedisBee) Action

func (mod *RedisBee) Action(action bees.Action) []bees.Placeholder

Action triggers the action passed to it.

func (*RedisBee) ReloadOptions

func (mod *RedisBee) ReloadOptions(options bees.BeeOptions)

ReloadOptions parses the config options and initializes the Bee.

func (*RedisBee) Run

func (mod *RedisBee) Run(eventChan chan bees.Event)

Run executes the Bee's event loop.

type RedisBeeFactory

type RedisBeeFactory struct {
	bees.BeeFactory
}

RedisBeeFactory takes care of initializing RedisBee

func (*RedisBeeFactory) Actions

func (factory *RedisBeeFactory) Actions() []bees.ActionDescriptor

Actions describes the available actions provided by this Bee.

func (*RedisBeeFactory) Description

func (factory *RedisBeeFactory) Description() string

Description returns the description of this Bee.

func (*RedisBeeFactory) Events

func (factory *RedisBeeFactory) Events() []bees.EventDescriptor

Events describes the available events provided by this Bee.

func (*RedisBeeFactory) ID

func (factory *RedisBeeFactory) ID() string

ID returns the ID of this Bee.

func (*RedisBeeFactory) Image

func (factory *RedisBeeFactory) Image() string

Image returns the asset name of this Bee (in the assets/bees folder)

func (*RedisBeeFactory) Name

func (factory *RedisBeeFactory) Name() string

Name returns the name of this Bee.

func (*RedisBeeFactory) New

func (factory *RedisBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface

New returns a new Bee instance configured with the supplied options.

func (*RedisBeeFactory) Options

func (factory *RedisBeeFactory) Options() []bees.BeeOptionDescriptor

Options returns the options available to configure this Bee.

Jump to

Keyboard shortcuts

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