api

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTargetTimeout = 10 * time.Second
View Source
var ErrInvalidMsgType = errors.New("invalid message type")

ErrInvalidMsgType is returned by an Option in case the Option is supplied an unexpected proto.Message

View Source
var ErrInvalidValue = errors.New("invalid value")

ErrInvalidValue is returned by a Option in case the Option is supplied an unexpected value.

Functions

This section is empty.

Types

type Target added in v0.0.10

type Target struct {
	Config *config.TargetConfig
	// contains filtered or unexported fields
}

func NewTarget added in v0.0.10

func NewTarget(opts ...TargetOption) (*Target, error)

func NewTargetFromConfig added in v0.0.10

func NewTargetFromConfig(tc *config.TargetConfig) *Target

func (*Target) CertClient added in v0.0.10

func (t *Target) CertClient() cert.CertificateManagementClient

func (*Target) Close added in v0.0.10

func (t *Target) Close() error

func (*Target) Conn added in v0.0.10

func (t *Target) Conn() grpc.ClientConnInterface

func (*Target) CreateGrpcClient added in v0.0.10

func (t *Target) CreateGrpcClient(ctx context.Context, opts ...grpc.DialOption) error

func (*Target) FileClient added in v0.0.10

func (t *Target) FileClient() file.FileClient

func (*Target) NewOsClient added in v0.0.10

func (t *Target) NewOsClient() gnoios.OSClient

func (*Target) SystemClient added in v0.0.10

func (t *Target) SystemClient() system.SystemClient

type TargetOption added in v0.0.10

type TargetOption func(*Target) error

func Address added in v0.0.10

func Address(addr string) TargetOption

Address sets the target address. This Option can be set multiple times.

func Gzip added in v0.0.10

func Gzip(b bool) TargetOption

Gzip, if set to true, adds gzip compression to the gRPC connection.

func Insecure added in v0.0.10

func Insecure(i bool) TargetOption

Insecure sets the option to create a gNMI client with an insecure gRPC connection

func Name added in v0.0.10

func Name(name string) TargetOption

Name sets the target name.

func Password added in v0.0.10

func Password(password string) TargetOption

Password sets the target Password.

func SkipVerify added in v0.0.10

func SkipVerify(i bool) TargetOption

SkipVerify sets the option to create a gNMI client with a secure gRPC connection without verifying the target's certificates.

func TLSCA added in v0.0.10

func TLSCA(tlsca string) TargetOption

TLSCA sets that path towards the TLS certificate authority file.

func TLSCert added in v0.0.10

func TLSCert(cert string) TargetOption

TLSCert sets that path towards the TLS certificate file.

func TLSKey added in v0.0.10

func TLSKey(key string) TargetOption

TLSKey sets that path towards the TLS key file.

func TLSMaxVersion added in v0.0.10

func TLSMaxVersion(v string) TargetOption

TLSMaxVersion sets the TLS maximum version used during the TLS handshake.

func TLSMinVersion added in v0.0.10

func TLSMinVersion(v string) TargetOption

TLSMinVersion sets the TLS minimum version used during the TLS handshake.

func TLSVersion added in v0.0.10

func TLSVersion(v string) TargetOption

TLSVersion sets the desired TLS version used during the TLS handshake.

func Timeout added in v0.0.10

func Timeout(timeout time.Duration) TargetOption

Timeout sets the gNMI client creation timeout.

func Username added in v0.0.10

func Username(username string) TargetOption

Username sets the target Username.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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