Skip to content

sgilson/go-sysv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System V Wrapper

Overview

A limited wrapper around System V inter-process communication facilities. This package does not aim to expose the full System V feature set but rather expose a limited set of features in idiomatic and safe Go.

Implemented facilities:

  • Message queues
    • Create queue
    • Delete queue
    • Send
    • Receive
    • Manage existing queue
  • Semaphore sets
  • Shared memory segments

Example

The example files can be run using the following commands:

go run example/sender/main.go    # Create queue and send message
go run example/receiver/main.go  # Receive one message
go run example/cleanup/main.go   # Delete queue from system

Send and receive can be run in any order, though note the receiver will block until a message arrives.

If you experience trouble on your system and need to delete queues without using this package, use ipcs and ipcrm.

# Show all system v resources
ipcs -oa
# Delete queue by id
ipcrm -q $QUEUE_ID

Installation

Install this package using go get:

go get github.com/sgilson/go-sysv

About

A Golang wrapper for System V IPC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages