dapr

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIVersion string   `yaml:"apiVersion"`
	Kind       string   `yaml:"kind"`
	Metadata   Metadata `yaml:"metadata"`
	Spec       Spec     `yaml:"spec"`
}

Config is a type that represents a Config instance

func NewDapr

func NewDapr(name string, opts ...Option) *Config

NewDapr creates a new Config instance

func (*Config) ToYaml

func (d *Config) ToYaml() (string, error)

ToYaml converts a DaprConfig instance to YAML

type Metadata

type Metadata struct {
	Name string `yaml:"name"`
}

Metadata is a type that represents a Config metadata

type Option

type Option func(*Config)

Option is a type that represents a Config option

func WithCreds

func WithCreds(jwt string, nkey string) Option

WithCreds sets the credentials for the DaprConfig

func WithNatsURL

func WithNatsURL(url string) Option

WithNatsURL sets the NATS URL for the DaprConfig

type Spec

type Spec struct {
	Type         string         `yaml:"type"`
	Version      string         `yaml:"version"`
	SpecMetadata []SpecMetadata `yaml:"metadata"`
}

Spec is a type that represents a Config spec

type SpecMetadata

type SpecMetadata struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

SpecMetadata is a type that represents a Config spec metadata

Jump to

Keyboard shortcuts

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