Help us shape the future of Go! Take the 2026 Go Developer Survey

lockfile

package module
v0.0.0-...-2709c95 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: MIT Imports: 7 Imported by: 1

README

Build Status Coverage

problem statement

golang package for file based locking

features

  • API exposed via interface
  • fake implementation to allow faking interactions

Be advised: this project is currently at Major version zero. Per the semantic versioning spec: "Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable."

Releases

for every release:

Versioning

This project adheres to the Semantic Versioning specification

Contributing

see CONTRIBUTING.md

Changelog

see CHANGELOG.md

Documentation

Overview

This file was generated by counterfeiter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

type Fake struct {
	LockStub func(filepath string) error

	PIdOfOwnerStub func(filepath string) int
	// contains filtered or unexported fields
}

func (*Fake) Invocations

func (fake *Fake) Invocations() map[string][][]interface{}

func (*Fake) Lock

func (fake *Fake) Lock(filepath string) error

func (*Fake) LockArgsForCall

func (fake *Fake) LockArgsForCall(i int) string

func (*Fake) LockCallCount

func (fake *Fake) LockCallCount() int

func (*Fake) LockReturns

func (fake *Fake) LockReturns(result1 error)

func (*Fake) PIdOfOwner

func (fake *Fake) PIdOfOwner(filepath string) int

func (*Fake) PIdOfOwnerArgsForCall

func (fake *Fake) PIdOfOwnerArgsForCall(i int) string

func (*Fake) PIdOfOwnerCallCount

func (fake *Fake) PIdOfOwnerCallCount() int

func (*Fake) PIdOfOwnerReturns

func (fake *Fake) PIdOfOwnerReturns(result1 int)

type LockFile

type LockFile interface {
	// obtains a lock
	Lock(filepath string) error

	// obtains the PId of the current lock owner
	PIdOfOwner(filepath string) int
}

func New

func New() LockFile

Jump to

Keyboard shortcuts

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