hostsfile

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentHostsFile

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

func NewConcurrentHostsFile

func NewConcurrentHostsFile() *ConcurrentHostsFile

func (*ConcurrentHostsFile) Lock

func (chfptr *ConcurrentHostsFile) Lock()

func (*ConcurrentHostsFile) RemoveHostsEntry

func (chfptr *ConcurrentHostsFile) RemoveHostsEntry(objectId string) bool

func (*ConcurrentHostsFile) SetHostsEntry

func (chfptr *ConcurrentHostsFile) SetHostsEntry(objectId string, he HostsEntry) bool

func (*ConcurrentHostsFile) String

func (chfptr *ConcurrentHostsFile) String() string

func (*ConcurrentHostsFile) Unlock

func (chfptr *ConcurrentHostsFile) Unlock()

type HostsEntry

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

func NewHostsEntry

func NewHostsEntry(ip string, hosts []string) *HostsEntry

func (*HostsEntry) Equals

func (he *HostsEntry) Equals(other *HostsEntry) bool

func (*HostsEntry) String

func (he *HostsEntry) String() string

type HostsFile

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

func NewHostsFile

func NewHostsFile() *HostsFile

func (*HostsFile) RemoveHostsEntry

func (hf *HostsFile) RemoveHostsEntry(objectId string) bool

func (*HostsFile) SetHostsEntry

func (hf *HostsFile) SetHostsEntry(objectId string, entry HostsEntry) bool

func (*HostsFile) String

func (hf *HostsFile) String() string

type IHostsFile

type IHostsFile interface {
	SetHostsEntry(objectId string, entry HostsEntry) bool
	RemoveHostsEntry(objectId string) bool

	String() string
}

Jump to

Keyboard shortcuts

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