Documentation
¶
Index ¶
- Constants
- Variables
- func Copy(dst, src *websocket.Conn) (int64, error)
- func CopyFrom(dst io.Writer, src *websocket.Conn) (written int64, err error)
- func CopyTo(dst *websocket.Conn, src io.Reader) (written int64, err error)
- func DefaultClientConfig(flags *pflag.FlagSet) clientcmd.ClientConfig
- func Dial(address string, tlsConfig *tls.Config) (*websocket.Conn, *http.Response, error)
- func NewUpgrader() *websocket.Upgrader
- func NewWebsocketStreamer(conn *websocket.Conn, done chan struct{}) *wsStreamer
- func RequestFromConfig(config *rest.Config, resource, name, namespace, subresource string, ...) (*http.Request, error)
- type AsyncSubresourceError
- type Client
- type RoundTripCallback
- type SerialConsoleOptions
- type StreamInterface
- type StreamOptions
- type VirtualMachineInterface
- type WebsocketRoundTripper
Constants ¶
View Source
const PlainStreamProtocolName = "plain.virtualization.deckhouse.io"
View Source
const (
WebsocketMessageBufferSize = 10240
)
Variables ¶
View Source
var ( Scheme = runtime.NewScheme() Codecs = serializer.NewCodecFactory(Scheme) )
View Source
var GetClientFromClientConfig = func(cmdConfig clientcmd.ClientConfig) (Client, error) { config, err := cmdConfig.ClientConfig() if err != nil { return nil, err } return GetClientFromRESTConfig(config) }
Functions ¶
func DefaultClientConfig ¶
func DefaultClientConfig(flags *pflag.FlagSet) clientcmd.ClientConfig
func NewUpgrader ¶
func NewWebsocketStreamer ¶
Types ¶
type AsyncSubresourceError ¶
type AsyncSubresourceError struct {
StatusCode int
// contains filtered or unexported fields
}
func (*AsyncSubresourceError) Error ¶
func (a *AsyncSubresourceError) Error() string
func (*AsyncSubresourceError) GetStatusCode ¶
func (a *AsyncSubresourceError) GetStatusCode() int
type Client ¶
type Client interface {
ClusterVirtualImages() virtualizationv1alpha2.ClusterVirtualImageInterface
VirtualMachines(namespace string) VirtualMachineInterface
VirtualImages(namespace string) virtualizationv1alpha2.VirtualImageInterface
VirtualDisks(namespace string) virtualizationv1alpha2.VirtualDiskInterface
VirtualMachineBlockDeviceAttachments(namespace string) virtualizationv1alpha2.VirtualMachineBlockDeviceAttachmentInterface
VirtualMachineIPAddresses(namespace string) virtualizationv1alpha2.VirtualMachineIPAddressInterface
VirtualMachineIPAddressLeases() virtualizationv1alpha2.VirtualMachineIPAddressLeaseInterface
VirtualMachineOperations(namespace string) virtualizationv1alpha2.VirtualMachineOperationInterface
VirtualMachineClasses() virtualizationv1alpha2.VirtualMachineClassInterface
}
type RoundTripCallback ¶
type SerialConsoleOptions ¶
type StreamInterface ¶
type StreamInterface interface {
Stream(options StreamOptions) error
AsConn() net.Conn
}
type VirtualMachineInterface ¶
type VirtualMachineInterface interface {
virtualizationv1alpha2.VirtualMachineInterface
SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error)
VNC(name string) (StreamInterface, error)
PortForward(name string, opts v1alpha2.VirtualMachinePortForward) (StreamInterface, error)
Freeze(ctx context.Context, name string, opts v1alpha2.VirtualMachineFreeze) error
Unfreeze(ctx context.Context, name string) error
Migrate(ctx context.Context, name string, opts v1alpha2.VirtualMachineMigrate) error
AddVolume(ctx context.Context, name string, opts v1alpha2.VirtualMachineAddVolume) error
RemoveVolume(ctx context.Context, name string, opts v1alpha2.VirtualMachineRemoveVolume) error
}
type WebsocketRoundTripper ¶
type WebsocketRoundTripper struct {
Dialer *websocket.Dialer
Do RoundTripCallback
}
Click to show internal directories.
Click to hide internal directories.