Documentation
¶
Index ¶
Constants ¶
const AWSIPRangesURL = "https://ip-ranges.amazonaws.com/ip-ranges.json"
Variables ¶
This section is empty.
Functions ¶
func DiscardAfterClose ¶
func DiscardAfterClose(wc io.WriteCloser) io.WriteCloser
DiscardAfterClose is an io.WriteCloser that discards writes after it is closed without errors. It is useful as a target for a slog.Sink such that an underlying WriteCloser, like a file, can be cleaned up without race conditions from still-active loggers.
func Hostname ¶ added in v2.5.0
func Hostname() string
Hostname returns the hostname of the machine, lowercased, with any trailing domain suffix stripped. It is cached after the first call. If the hostname cannot be determined, for any reason, localhost will be returned instead.
func WarnMatchedProvisioners ¶ added in v2.18.1
func WarnMatchedProvisioners(w io.Writer, mp *codersdk.MatchedProvisioners, job codersdk.ProvisionerJob)
WarnMatchedProvisioners warns the user if there are no provisioners that match the requested tags for a given provisioner job. If the job is not pending, it is ignored.
Types ¶
type AWSIPRanges ¶ added in v2.15.0
func FetchAWSIPRanges ¶ added in v2.15.0
func FetchAWSIPRanges(ctx context.Context, url string) (*AWSIPRanges, error)