krakend

package
v0.0.0-...-4687d0b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package krakend registers a bloomfilter given a config and registers the service with consul.

Index

Constants

View Source
const Namespace = "github_com/devopsfaith/bloomfilter"

Namespace for bloomfilter

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	bf_rpc.Config
	TokenKeys []string
	Headers   []string
}

Config defines the configuration to be added to the KrakenD gateway

type Rejecter

type Rejecter struct {
	BF        bloomfilter.Bloomfilter
	TokenKeys []string
	Headers   []string
}

func Register

func Register(ctx context.Context, serviceName string, cfg config.ServiceConfig,
	logger logging.Logger, register func(n string, p int)) (Rejecter, error)

Register registers a bloomfilter given a config and registers the service with consul

func (*Rejecter) RejectHeader

func (r *Rejecter) RejectHeader(header http.Header) bool

func (*Rejecter) RejectToken

func (r *Rejecter) RejectToken(claims map[string]interface{}) bool

Jump to

Keyboard shortcuts

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