libkv

package
v0.0.0-...-089673d Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: Apache-2.0 Imports: 18 Imported by: 1

README

libkv package

This package implements function.Service and subscription.Service using libkv (etcd) as a backend store.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORSKey

type CORSKey struct {
	Space string
	ID    cors.ID
}

CORSKey is a key under which CORS data is stored KV store.

func (CORSKey) String

func (key CORSKey) String() string

type EventTypeKey

type EventTypeKey struct {
	Space string
	Name  event.TypeName
}

EventTypeKey is a key under which event type data is stored KV store.

func (EventTypeKey) String

func (key EventTypeKey) String() string

type FunctionKey

type FunctionKey struct {
	Space string
	ID    function.ID
}

FunctionKey is a key under which function data is stored KV store.

func (FunctionKey) String

func (key FunctionKey) String() string

type Service

type Service struct {
	EventTypeStore    store.Store
	FunctionStore     store.Store
	SubscriptionStore store.Store
	CORSStore         store.Store
	Log               *zap.Logger
}

Service implements function.Service and subscription.Service using libkv as a backend.

func (Service) CreateCORS

func (service Service) CreateCORS(config *cors.CORS) (*cors.CORS, error)

CreateCORS creates CORS configuration.

func (Service) CreateEventType

func (service Service) CreateEventType(eventType *event.Type) (*event.Type, error)

CreateEventType creates event type in configuration.

func (Service) CreateFunction

func (service Service) CreateFunction(fn *function.Function) (*function.Function, error)

CreateFunction registers function in configuration.

func (Service) CreateSubscription

func (service Service) CreateSubscription(sub *subscription.Subscription) (*subscription.Subscription, error)

CreateSubscription creates subscription.

func (Service) DeleteCORS

func (service Service) DeleteCORS(space string, id cors.ID) error

DeleteCORS deletes CORS config from the configuration.

func (Service) DeleteEventType

func (service Service) DeleteEventType(space string, name event.TypeName) error

DeleteEventType deletes event type from the configuration.

func (Service) DeleteFunction

func (service Service) DeleteFunction(space string, id function.ID) error

DeleteFunction deletes function from the registry.

func (Service) DeleteSubscription

func (service Service) DeleteSubscription(space string, id subscription.ID) error

DeleteSubscription deletes subscription.

func (Service) GetCORS

func (service Service) GetCORS(space string, id cors.ID) (*cors.CORS, error)

GetCORS returns function from configuration.

func (Service) GetEventType

func (service Service) GetEventType(space string, name event.TypeName) (*event.Type, error)

GetEventType returns function from configuration.

func (Service) GetFunction

func (service Service) GetFunction(space string, id function.ID) (*function.Function, error)

GetFunction returns function from configuration.

func (Service) GetSubscription

func (service Service) GetSubscription(space string, id subscription.ID) (*subscription.Subscription, error)

GetSubscription return single subscription.

func (Service) ListCORS

func (service Service) ListCORS(space string, filters ...metadata.Filter) (cors.CORSes, error)

ListCORS returns an array of all CORS configuration in the space.

func (Service) ListEventTypes

func (service Service) ListEventTypes(space string, filters ...metadata.Filter) (event.Types, error)

ListEventTypes returns an array of all event types in the space.

func (Service) ListFunctions

func (service Service) ListFunctions(space string, filters ...metadata.Filter) (function.Functions, error)

ListFunctions returns an array of all functions in the space.

func (Service) ListSubscriptions

func (service Service) ListSubscriptions(space string, filters ...metadata.Filter) (subscription.Subscriptions, error)

ListSubscriptions returns array of all Subscription.

func (Service) UpdateCORS

func (service Service) UpdateCORS(config *cors.CORS) (*cors.CORS, error)

UpdateCORS updates CORS configuration.

func (Service) UpdateEventType

func (service Service) UpdateEventType(newEventType *event.Type) (*event.Type, error)

UpdateEventType updates subscription.

func (Service) UpdateFunction

func (service Service) UpdateFunction(fn *function.Function) (*function.Function, error)

UpdateFunction updates function configuration.

func (Service) UpdateSubscription

func (service Service) UpdateSubscription(id subscription.ID, newSub *subscription.Subscription) (*subscription.Subscription, error)

UpdateSubscription updates subscription.

Jump to

Keyboard shortcuts

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