Skip to content

cooper/system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

system

This is a system library that provides a message bus; process, user, and device management; and much more.

Goals of this software

  • initial daemon: process launcher and init daemon. (LaunchManager)
  • communication: interprocess communication mechanism. (CommunicationManager)
  • logging: system logging bus. (LogManager)
  • users: user, files, and password management. (UserManager)
  • devices: device management service. (DeviceManager)

Browing the source

If you are unfamiliar with Go package source files, a simple explanation is that the file location of source code typically does not matter. Similarly, the order in which functions, constants, types, variables, etc. are defined does not matter. Any of these could be moved from file to file without changing the functionality of the program.

However, this projects organizes related code into files, as seen below:

  • interface.go: contains most of the exported functions for use in everyday programs.
  • bus.go: includes code used by files involving system buses.
  • bus-server.go: provides a simple listening mechanism for listening system bus servers.
  • bus-client.go: provides a simple means of connecting to a system bus server.
  • constant.go: contains exported system constants.
  • logger.go: provides system.Logger, an instance of Go's Logger connected to a system log bus.
  • process.go: includes the Process type specification and other code related to the objective system process programming interface.

System-provided constants

These constants are provided for use throughout the system. Because they are part of the 'system' package, they must be accessed correctly, i.e.: system.PATH_SYSLIBSO.

/* system path constants */

const (
	PATH_RAMDISK = ""
	PATH_SYSDISK = "/drive" //                        // main drive mountpoint (/Volumes/System)

	PATH_USER        = "/Files"        //             // user files spun across all drives
	PATH_VOLUME      = "/Volumes"      //             // mounted volumes
	PATH_APPLICATION = "/Applications" //             // application bundles

	PATH_SYSTEM     = "/System"                       // files belonging to the system itself
	PATH_SYSLIBRARY = "/System/Library"               // modules, libraries, extensions, etc.
	PATH_SYSLIBSO   = "/System/Library/SharedObjects" // dynamically loaded libraries (i.e. /lib)
	PATH_SYSBUS     = "/System/Bus"                   // system bus sockets
	PATH_SYSDEVICE  = "/System/Devices"               // Linux device nodes (eq. /dev)
	PATH_SYSLOG     = "/System/Logs"                  // generated logs
	PATH_SYSPROCESS = "/System/Processes"             // process files (similar to /proc)
)

About

linux system library providing message bus; plus process, user, and device management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages