api

package
v0.5.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespondWithError

func RespondWithError(w http.ResponseWriter, code int, message string)

RespondWithError is a helper method for returning an error http message

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})

RespondWithJSON is a helper method for returning an HTTP message with a JSON payload

Types

type Configuration

type Configuration struct {
	Spec ConfigurationSpec `json:"spec,omitempty"`
}

type ConfigurationSpec

type ConfigurationSpec struct {
	HTTPPipelineSpec PipelineSpec `json:"httpPipeline,omitempty"`
	TracingSpec      TracingSpec  `json:"tracing,omitempty"`
}

type HandlerSpec added in v0.4.0

type HandlerSpec struct {
	Name         string       `json:"name"`
	Type         string       `json:"type"`
	SelectorSpec SelectorSpec `json:"selector,omitempty"`
}

type PipelineSpec added in v0.4.0

type PipelineSpec struct {
	Handlers []HandlerSpec `json:"handlers"`
}

type SelectorField added in v0.4.0

type SelectorField struct {
	Field string `json:"field"`
	Value string `json:"value"`
}

type SelectorSpec added in v0.4.0

type SelectorSpec struct {
	Fields []SelectorField `json:"fields"`
}

type Server added in v0.2.0

type Server interface {
	Run(ctx context.Context)
}

Server runs the Dapr API server for components and configurations

func NewAPIServer

func NewAPIServer(client scheme.Interface) Server

NewAPIServer returns a new API server

type TracingSpec

type TracingSpec struct {
	Enabled      bool `json:"enabled"`
	ExpandParams bool `json:"expandParams"`
	IncludeBody  bool `json:"includeBody"`
}

Jump to

Keyboard shortcuts

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