service

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 13 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

This section is empty.

Types

type APIsConfig

type APIsConfig struct {
	HTTP HTTPConfig `yaml:"http" json:"http"`
	GRPC GRPCConfig `yaml:"grpc" json:"grpc"`
}

func (*APIsConfig) Validate

func (c *APIsConfig) Validate() error

type ClientsConfig

type ClientsConfig struct {
	Device device.Config `yaml:"device" json:"device"`
}

func (*ClientsConfig) Validate

func (c *ClientsConfig) Validate() error

type Config

type Config struct {
	Log     log.Config    `yaml:"log" json:"log"`
	APIs    APIsConfig    `yaml:"apis" json:"apis"`
	Clients ClientsConfig `yaml:"clients" json:"clients"`
}

Config represent application configuration

func (Config) String

func (c Config) String() string

String return string representation of Config

func (*Config) Validate

func (c *Config) Validate() error

type GRPCConfig

type GRPCConfig struct {
	Enabled     bool `yaml:"enabled" json:"enabled"`
	grpc.Config `yaml:",inline" json:",inline"`
}

type HTTPConfig

type HTTPConfig struct {
	Enabled     bool `yaml:"enabled" json:"enabled"`
	http.Config `yaml:",inline" json:",inline"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, config Config, logger log.Logger) (*Service, error)

New creates server.

func (*Service) Close

func (server *Service) Close() error

Shutdown turn off server.

func (*Service) Serve

func (server *Service) Serve() error

Serve starts a device provisioning service on the configured address in *Service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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