host

package
v0.1.51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 18

Documentation

Overview

Package host parses v1 and v2 hostnames into their constituent parts. It is intended to help in the transition from v1 to v2 names on the platform. M-Lab go programs that need to parse hostnames should use this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Name

type Name struct {
	Machine string
	Site    string
	Project string
	Domain  string
	Version string
}

Name represents an M-Lab hostname and all of its constituent parts.

func Parse

func Parse(name string) (Name, error)

Parse parses an M-Lab hostname and breaks it into its constituent parts. Parse also accepts service names and discards the service portion of the name.

func (Name) String added in v0.1.41

func (n Name) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL