MCPcopy
hub / github.com/grafana/tempo / Create

Function Create

pkg/util/shutdownmarker/shutdown_marker.go:23–25  ·  view source on GitHub ↗

Create writes a marker file on the given path to indicate that a component is going to be scaled down in the future. The presence of this file means that a component should perform some operations specified by the component itself before being shutdown.

(p string)

Source from the content-addressed store, hash-verified

21// going to be scaled down in the future. The presence of this file means that a component
22// should perform some operations specified by the component itself before being shutdown.
23func Create(p string) error {
24 return atomicfs.CreateFile(p, strings.NewReader(time.Now().UTC().Format(time.RFC3339)))
25}
26
27// Remove removes the shutdown marker file on the given path if it exists.
28func Remove(p string) error {

Callers 1

Calls 2

CreateFileFunction · 0.92
NowMethod · 0.65

Tested by

no test coverage detected