client

package
v2.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Overview

********************************************************************

  • Copyright (c) Intel Corporation 2024
  • SPDX-License-Identifier: Apache-2.0 *********************************************************************

Index

Constants

View Source
const ContentType = "application/soap+xml; charset=utf-8"
View Source
const NS_WSMAN = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
View Source
const NS_WSMID = "http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd"
View Source
const NonTLSPort = "16992"
View Source
const TLSPort = "16993"

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	XMLInput  string
	XMLOutput string
}

type Parameters

type Parameters struct {
	Target            string
	Username          string
	Password          string
	UseDigest         bool
	UseTLS            bool
	SelfSignedAllowed bool
	LogAMTMessages    bool
}

Parameters struct defines the connection settings for wsman client

type Target

type Target struct {
	http.Client

	OptimizeEnum bool
	// contains filtered or unexported fields
}

Target is a thin wrapper around http.Target.

func NewWsman

func NewWsman(cp Parameters) *Target

func (*Target) Post

func (c *Target) Post(msg string) (response []byte, err error)

Post overrides http.Client's Post method

func (*Target) ProxyUrl

func (c *Target) ProxyUrl(proxy_str string) (err error)

ProxyUrl sets proxy address for the underlying Transport if supported

type WSMan

type WSMan interface {
	Post(msg string) (response []byte, err error)
}

WSMan is an interface for the wsman.Client.

type WsTransport

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

WsTransport is an implementation of http.Transport which uses websocket relay

func NewWsTransport

func NewWsTransport(wsurl string, protocol int, host, username, password string, port int, tls, tls1only bool, token string, tlsconfig *tls.Config) *WsTransport

NewTransport creates a new Websocket RoundTripper.

func (*WsTransport) RoundTrip

func (t *WsTransport) RoundTrip(r *http.Request) (resp *http.Response, err error)

RoundTrip makes a low level text exchange over websocket. This is supposed to be used by high level round tripper

Jump to

Keyboard shortcuts

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