Documentation ¶
Index ¶
- Variables
- type Target
- func (t *Target) CertClient() cert.CertificateManagementClient
- func (t *Target) Close() error
- func (t *Target) Conn() grpc.ClientConnInterface
- func (t *Target) CreateGrpcClient(ctx context.Context, opts ...grpc.DialOption) error
- func (t *Target) FileClient() file.FileClient
- func (t *Target) NewOsClient() gnoios.OSClient
- func (t *Target) SystemClient() system.SystemClient
- type TargetOption
- func Address(addr string) TargetOption
- func Gzip(b bool) TargetOption
- func Insecure(i bool) TargetOption
- func Name(name string) TargetOption
- func Password(password string) TargetOption
- func SkipVerify(i bool) TargetOption
- func TLSCA(tlsca string) TargetOption
- func TLSCert(cert string) TargetOption
- func TLSKey(key string) TargetOption
- func TLSMaxVersion(v string) TargetOption
- func TLSMinVersion(v string) TargetOption
- func TLSVersion(v string) TargetOption
- func Timeout(timeout time.Duration) TargetOption
- func Username(username string) TargetOption
Constants ¶
This section is empty.
Variables ¶
var DefaultTargetTimeout = 10 * time.Second
var ErrInvalidMsgType = errors.New("invalid message type")
ErrInvalidMsgType is returned by an Option in case the Option is supplied an unexpected proto.Message
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) Conn ¶ added in v0.0.10
func (t *Target) Conn() grpc.ClientConnInterface
func (*Target) CreateGrpcClient ¶ added in v0.0.10
func (*Target) FileClient ¶ added in v0.0.10
func (t *Target) FileClient() file.FileClient
func (*Target) NewOsClient ¶ added in v0.0.10
func (*Target) SystemClient ¶ added in v0.0.10
func (t *Target) SystemClient() system.SystemClient
type TargetOption ¶ added in v0.0.10
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 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.