Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for TerminalSize (0.27 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/proxy/websocket.go

    // Read terminal resize events off of passed stream and queue into passed channel.
    func handleResizeEvents(ctx context.Context, stream io.Reader, channel chan<- remotecommand.TerminalSize) {
    	defer close(channel)
    
    	decoder := json.NewDecoder(stream)
    	for {
    		size := remotecommand.TerminalSize{}
    		if err := decoder.Decode(&size); err != nil {
    			break
    		}
    
    		select {
    		case channel <- size:
    		case <-ctx.Done():
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/proxy/streamtranslator_test.go

    // already returned "maxSizes" TerminalSizes already. Stores the randomly
    // created TerminalSize in "terminalSizes" field for later validation.
    func (f *fakeTerminalSizeQueue) Next() *remotecommand.TerminalSize {
    	if len(f.terminalSizes) >= f.maxSizes {
    		return nil
    	}
    	size := randomTerminalSize()
    	f.terminalSizes = append(f.terminalSizes, size)
    	return &size
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 27 23:21:55 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/util/proxy/streamtranslator.go

    // resizeChan into the SPDY client input. Implements TerminalSizeQueue
    // interface.
    type translatorSizeQueue struct {
    	resizeChan chan remotecommand.TerminalSize
    }
    
    func (t *translatorSizeQueue) Next() *remotecommand.TerminalSize {
    	size, ok := <-t.resizeChan
    	if !ok {
    		return nil
    	}
    	return &size
    }
    
    // codeExitToStatusError converts a passed CodeExitError to the type necessary
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 27 23:21:55 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go

    //
    // The third version of the Websocket RemoteCommand subprotocol adds another channel
    // for terminal resizing events. This channel is prepended with the byte '3', and it
    // transmits two window sizes (encoding TerminalSize struct) with integers in the range
    // (0,65536].
    //
    // "v4.channel.k8s.io"
    //
    // The fourth version of the Websocket RemoteCommand subprotocol adds a channel for
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 18:37:18 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  5. pkg/client/tests/remotecommand_test.go

    	return ex.run(name, uid, container, cmd, in, out, err, tty)
    }
    
    func (ex *fakeExecutor) AttachContainer(_ context.Context, name string, uid types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remoteclient.TerminalSize) error {
    	return ex.run(name, uid, container, nil, in, out, err, tty)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 06:08:18 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  6. pkg/kubelet/server/server_test.go

    	return nil, nil
    }
    
    type fakeRuntime struct {
    	execFunc        func(string, []string, io.Reader, io.WriteCloser, io.WriteCloser, bool, <-chan remotecommand.TerminalSize) error
    	attachFunc      func(string, io.Reader, io.WriteCloser, io.WriteCloser, bool, <-chan remotecommand.TerminalSize) error
    	portForwardFunc func(string, int32, io.ReadWriteCloser) error
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  7. cmd/kube-apiserver/app/server.go

    	options.AddCustomGlobalFlags(namedFlagSets.FlagSet("generic"))
    	for _, f := range namedFlagSets.FlagSets {
    		fs.AddFlagSet(f)
    	}
    
    	cols, _, _ := term.TerminalSize(cmd.OutOrStdout())
    	cliflag.SetUsageAndHelpFunc(cmd, namedFlagSets, cols)
    
    	return cmd
    }
    
    // Run runs the specified APIServer.  This should never exit.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 17:44:20 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  8. cmd/kube-scheduler/app/server.go

    	globalflag.AddGlobalFlags(nfs.FlagSet("global"), cmd.Name(), logs.SkipLoggingConfigurationFlags())
    	fs := cmd.Flags()
    	for _, f := range nfs.FlagSets {
    		fs.AddFlagSet(f)
    	}
    
    	cols, _, _ := term.TerminalSize(cmd.OutOrStdout())
    	cliflag.SetUsageAndHelpFunc(cmd, *nfs, cols)
    
    	if err := cmd.MarkFlagFilename("config", "yaml", "yml", "json"); err != nil {
    		klog.Background().Error(err, "Failed to mark flag filename")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  9. pkg/kubelet/container/testing/runtime_mock.go

    }
    
    // AttachContainer mocks base method.
    func (m *MockAttacher) AttachContainer(ctx context.Context, id container.ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {
    	m.ctrl.T.Helper()
    	ret := m.ctrl.Call(m, "AttachContainer", ctx, id, stdin, stdout, stderr, tty, resize)
    	ret0, _ := ret[0].(error)
    	return ret0
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 27K bytes
    - Viewed (0)
  10. pkg/kubelet/container/runtime.go

    }
    
    // Attacher interface allows to attach a container.
    type Attacher interface {
    	AttachContainer(ctx context.Context, id ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) (err error)
    }
    
    // CommandRunner interface allows to run command in a container.
    type CommandRunner interface {
    	// RunInContainer synchronously executes the command in the container, and returns the output.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 27.8K bytes
    - Viewed (0)
Back to top