- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ParsePortRange (0.16 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/net/port_range.go
// pflag.Value interface. func (*PortRange) Type() string { return "portRange" } // ParsePortRange parses a string of the form "min-max", inclusive at both // ends, and initializes a new PortRange from it. func ParsePortRange(value string) (*PortRange, error) { pr := &PortRange{} err := pr.Set(value) if err != nil { return nil, err } return pr, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 10 01:27:56 UTC 2020 - 3.4K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/operation_test.go
package portallocator import ( "testing" "k8s.io/apimachinery/pkg/util/net" ) // TestDryRunAllocate tests the Allocate function in dry run mode func TestDryRunAllocate(t *testing.T) { pr, err := net.ParsePortRange("10000-10200") if err != nil { t.Fatal(err) } // Allocate some ports before calling previouslyAllocated := []int{10000, 10010, 10020} r, err := NewInMemory(*pr) if err != nil { t.Fatal(err)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Aug 15 23:44:12 UTC 2021 - 3.1K bytes - Viewed (0) -
pkg/util/flag/flags.go
type PortRangeVar struct { Val *string } // Set sets the flag value func (v PortRangeVar) Set(s string) error { if _, err := utilnet.ParsePortRange(s); err != nil { return fmt.Errorf("%q is not a valid port range: %v", s, err) } if v.Val == nil { // it's okay to panic here since this is programmer error
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 19 03:30:46 UTC 2022 - 7.8K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/allocator.go
}) } // NewFromSnapshot allocates a PortAllocator and initializes it from a snapshot. func NewFromSnapshot(snap *api.RangeAllocation) (*PortAllocator, error) { pr, err := net.ParsePortRange(snap.Range) if err != nil { return nil, err } r, err := NewInMemory(*pr) if err != nil { return nil, err } if err := r.Restore(*pr, snap.Data); err != nil { return nil, err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 07:15:02 UTC 2024 - 7.4K bytes - Viewed (0)