node

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// Info returns administrative information about the node.
	Info func(context.Context) (Info, error) `perm:"admin"`
	// Ready returns true once the node's RPC is ready to accept requests.
	Ready func(context.Context) (bool, error) `perm:"read"`
	// LogLevelSet sets the given component log level to the given level.
	LogLevelSet func(ctx context.Context, name, level string) error `perm:"admin"`
	// AuthVerify returns the permissions assigned to the given token.
	AuthVerify func(ctx context.Context, token string) ([]auth.Permission, error) `perm:"admin"`
	// AuthNew signs and returns a new token with the given permissions.
	AuthNew func(ctx context.Context, perms []auth.Permission) ([]byte, error) `perm:"admin"`
}

type Info

type Info struct {
	Type       Type   `json:"type"`
	APIVersion string `json:"api_version"`
}

Info contains information related to the administrative node.

type Type

type Type uint8

Type defines the Node type (e.g. `light`, `bridge`) for identity purposes. The zero value for Type is invalid.

Jump to

Keyboard shortcuts

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