block

package
v0.0.0-...-756137a Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: AGPL-3.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithTracer = base.WithTracer

WithTracer returns an Option that configures the Client to use the supplied tracer.

Functions

This section is empty.

Types

type Client

type Client struct {
	base.ClientFacade
	// contains filtered or unexported fields
}

Client allows access to the block API end point.

func NewClient

func NewClient(st base.APICallCloser, options ...Option) *Client

NewClient creates a new client for accessing the block API.

func (*Client) List

func (c *Client) List(ctx context.Context) ([]params.Block, error)

List returns blocks that are switched on for current model.

func (*Client) SwitchBlockOff

func (c *Client) SwitchBlockOff(ctx context.Context, blockType string) error

SwitchBlockOff switches desired block off for the current model. Valid block types are "BlockDestroy", "BlockRemove" and "BlockChange".

func (*Client) SwitchBlockOn

func (c *Client) SwitchBlockOn(ctx context.Context, blockType, msg string) error

SwitchBlockOn switches desired block on for the current model. Valid block types are "BlockDestroy", "BlockRemove" and "BlockChange".

type Option

type Option = base.Option

Option is a function that can be used to configure a Client.

Jump to

Keyboard shortcuts

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