user

package
v0.0.0-...-e896590 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package user holds the code that users of the skeleton write for their broker. To make a broker, fill out:

  • The Options type, which holds options for the broker
  • The AddFlags function, which adds CLI flags for an Options
  • The methods of the BusinessLogic type, which implements the broker's business logic
  • The NewBusinessLogic function, which creates a BusinessLogic from the Options the program is run with

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserFlags

func AddUserFlags(o *Options)

AddUserFlags is a hook called to initialize the CLI flags for user options it is called after the flags are added for the skeleton and before flag.Parse is called.

Types

type BusinessLogic

type BusinessLogic struct {
	// Add fields here! These fields are provided purely as an example
	sync.RWMutex
	// contains filtered or unexported fields
}

BusinessLogic provides an implementation of the broker.BusinessLogic interface.

func NewBusinessLogic

func NewBusinessLogic(o Options) (*BusinessLogic, error)

NewBusinessLogic is a hook that is called with the Options the program is run with. NewBusinessLogic is the place where you will initialize your BusinessLogic the parameters passed in.

func (*BusinessLogic) Bind

func (*BusinessLogic) Deprovision

func (*BusinessLogic) GetCatalog

func (*BusinessLogic) LastOperation

func (*BusinessLogic) Provision

func (*BusinessLogic) Unbind

func (*BusinessLogic) Update

func (*BusinessLogic) ValidateBrokerAPIVersion

func (b *BusinessLogic) ValidateBrokerAPIVersion(version string) error

type Options

type Options struct {
	CatalogPath string
}

Options holds the options specified by the user's code on the command line. Users should add their own options here and add flags for them in AddUserFlags.

Jump to

Keyboard shortcuts

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