easy

package
v0.0.0-...-315b7b0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Easy

type Easy struct {
	*logrus.Logger
	// contains filtered or unexported fields
}

func Default

func Default(options ...Option) (*Easy, error)

func New

func New(options ...Option) (*Easy, error)

NewEasy create a new µs according to the passed options WithID: default random WithName: default "default"

func (*Easy) AuthN

func (easy *Easy) AuthN() interfaces.AuthN

func (*Easy) Broker

func (easy *Easy) Broker() interfaces.Broker

func (*Easy) Cache

func (easy *Easy) Cache() interfaces.Cache

func (*Easy) Client

func (easy *Easy) Client() interfaces.Client

func (*Easy) Configuration

func (easy *Easy) Configuration() interfaces.Configuration

func (*Easy) DELETE

func (easy *Easy) DELETE(route string, handler interface{}) error

func (*Easy) Debug

func (easy *Easy) Debug(message interface{})

func (*Easy) Error

func (easy *Easy) Error(message interface{})

func (*Easy) Fatal

func (easy *Easy) Fatal(message interface{})

func (*Easy) GET

func (easy *Easy) GET(route string, handler interface{}) error

func (*Easy) Handler

func (easy *Easy) Handler(mode, route string, handler interface{}) error

func (*Easy) HookShutDown

func (easy *Easy) HookShutDown(fn func())

func (*Easy) ID

func (easy *Easy) ID() string

ID() return the µs' ID Part of Service interface implementation

func (*Easy) Info

func (easy *Easy) Info(message interface{})

func (*Easy) IsRunning

func (easy *Easy) IsRunning() bool

func (*Easy) Name

func (easy *Easy) Name() string

Name() return the µs' name Part of Service interface implementation

func (*Easy) POST

func (easy *Easy) POST(route string, handler interface{}) error

func (*Easy) PUT

func (easy *Easy) PUT(route string, handler interface{}) error

func (*Easy) Processor

func (easy *Easy) Processor() interfaces.Processor

func (*Easy) Publish

func (easy *Easy) Publish(endpoint string, msg interface{}) error

func (*Easy) Registry

func (easy *Easy) Registry() interfaces.Registry

Registry() return the µs' registry

func (*Easy) Run

func (easy *Easy) Run()

func (*Easy) Stop

func (easy *Easy) Stop()

func (*Easy) Store

func (easy *Easy) Store() interfaces.Store

func (*Easy) Subscribe

func (easy *Easy) Subscribe(endpoint string, handler interface{}) error

func (*Easy) Transport

func (easy *Easy) Transport() interfaces.Transport

Transport() return the µs' transport

func (*Easy) Unsubscribe

func (easy *Easy) Unsubscribe(endpoint string) error

func (*Easy) Warn

func (easy *Easy) Warn(message interface{})

type Option

type Option func(*Easy) error

func WithBroker

func WithBroker(broker interfaces.Broker) Option

func WithCache

func WithCache(cache interfaces.Cache) Option

func WithClient

func WithClient(client interfaces.Client) Option

func WithConfiguration

func WithConfiguration(configuration interfaces.Configuration) Option

func WithDefaultAuthN

func WithDefaultAuthN(folder string) Option

func WithDefaultBroker

func WithDefaultBroker() Option

func WithDefaultConfiguration

func WithDefaultConfiguration() Option

func WithDefaultRegistry

func WithDefaultRegistry() Option

func WithDefaultTransport

func WithDefaultTransport() Option

func WithHandler

func WithHandler(mode, route string, handler interface{}) Option

func WithID

func WithID(id string) Option

WithID(id string) set the id of the µs

func WithLocalConfiguration

func WithLocalConfiguration() Option
func WithLogo(logo interface{}) Option

func WithMiddleware

func WithMiddleware(middleware interface{}) Option

func WithName

func WithName(name string) Option

WithName(name string) set the id of the µs

func WithPlugin

func WithPlugin(lib, name string) Option

func WithProcessor

func WithProcessor(processor interfaces.Processor) Option

func WithRegistry

func WithRegistry(registry interfaces.Registry) Option

func WithRemoteConfiguration

func WithRemoteConfiguration(provider, uri string) Option

func WithStaticFilesFolder

func WithStaticFilesFolder(route, folder string) Option

func WithStore

func WithStore(store interfaces.Store) Option

func WithTransport

func WithTransport(transport interfaces.Transport) Option

Jump to

Keyboard shortcuts

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