...

Package pidfile

import "github.com/chaos-mesh/chaos-mesh/pkg/pidfile"
Overview
Index

Overview ▾

Package pidfile provides structure and helper functions to create and remove PID file. A PID file is usually a file used to store the process ID of a running process.

Copyright Moby Licensed under the Apache License, Version 2.0 (the "License")

type PIDFile

PIDFile is a file used to store the process ID of a running process.

type PIDFile struct {
    // contains filtered or unexported fields
}

func New

func New(path string) (*PIDFile, error)

New creates a PIDfile using the specified path.

func (PIDFile) Remove

func (file PIDFile) Remove() error

Remove removes the PIDFile.