code: func (ss StreamService) Attach(containerID string, inputStream io.Reader, outputStream, errorStream io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {
  	c, err := ss.runtimeServer.GetContainerFromShortID(containerID)
  	if err != nil {
  		return fmt.Errorf("could not find container %q: %v", containerID, err)
  	}
  
  	if err := ss.runtimeServer.Runtime().UpdateContainerStatus(c); err != nil {
  		return err
  	}
  
  	cState := c.State()
  	if !(cState.Status == oci.ContainerStateRunning || cState.Status == oci.ContainerStateCreated) {
  		return fmt.Errorf("container is not created or running")
  	}
  
  	return ss.runtimeServer.Runtime().AttachContainer(c, inputStream, outputStream, errorStream, tty, resize)
  }
docs: // Attach endpoint for streaming.Runtime