load

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Load

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

Load is used to reload given storage.

func NewLoader

func NewLoader(ctx context.Context, loader Loader) *Load

NewLoader return a loader with a loader implement.

func (*Load) DoReload

func (l *Load) DoReload()

DoReload reload secrets and policies.

func (*Load) Start

func (l *Load) Start()

Start start a loop service.

type Loader

type Loader interface {
	Reload() error
}

Loader defines function to reload storage.

type Notification

type Notification struct {
	Command       NotificationCommand `json:"command"`
	Payload       string              `json:"payload"`
	Signature     string              `json:"signature"`
	SignatureAlgo crypto.Hash         `json:"algorithm"`
}

Notification is a type that encodes a message published to a pub sub channel (shared between implementations).

func (*Notification) Sign

func (n *Notification) Sign()

Sign sign Notification with SHA256 algorithm.

type NotificationCommand

type NotificationCommand string

NotificationCommand defines a new notification type.

const (
	RedisPubSubChannel                      = "iam.cluster.notifications"
	NoticePolicyChanged NotificationCommand = "PolicyChanged"
	NoticeSecretChanged NotificationCommand = "SecretChanged"
)

Define Redis pub/sub events.

type RedisNotifier

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

RedisNotifier will use redis pub/sub channels to send notifications.

func (*RedisNotifier) Notify

func (r *RedisNotifier) Notify(notif interface{}) bool

Notify will send a notification to a channel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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