github.com/vmware/govmomi@v0.51.0/find/doc.go (about)

     1  // © Broadcom. All Rights Reserved.
     2  // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
     3  // SPDX-License-Identifier: Apache-2.0
     4  
     5  /*
     6  Package find implements inventory listing and searching.
     7  
     8  The Finder is an alternative to the object.SearchIndex FindByInventoryPath() and FindChild() methods.
     9  SearchIndex.FindByInventoryPath requires an absolute path, whereas the Finder also supports relative paths
    10  and patterns via path.Match.
    11  SearchIndex.FindChild requires a parent to find the child, whereas the Finder also supports an ancestor via
    12  recursive object traversal.
    13  
    14  The various Finder methods accept a "path" argument, which can absolute or relative to the Folder for the object type.
    15  The Finder supports two modes, "list" and "find".  The "list" mode behaves like the "ls" command, only searching within
    16  the immediate path.  The "find" mode behaves like the "find" command, with the search starting at the immediate path but
    17  also recursing into sub Folders relative to the Datacenter.  The default mode is "list" if the given path contains a "/",
    18  otherwise "find" mode is used.
    19  
    20  The exception is to use a "..." wildcard with a path to find all objects recursively underneath any root object.
    21  For example: VirtualMachineList("/DC1/...")
    22  
    23  Finder methods can also convert a managed object reference (aka MOID) to an object instance.
    24  For example: VirtualMachine("VirtualMachine:vm-123") or VirtualMachine("vm-123")
    25  
    26  See also: https://github.com/vmware/govmomi/blob/main/govc/README.md#usage
    27  */
    28  package find