asink

package module
v0.0.0-...-03e6a06 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2014 License: GPL-2.0 Imports: 7 Imported by: 0

README

README for Asink Project
Copyright (C) 2013 Aaron Lindsay <aaron@aclindsay.com>


Purpose
=======

Asink seeks to be a file synchronization system which doesn't force users to
choose between open-source and convenience. It also seeks to maintain a high
level of security and privacy, and therefore optionally encrypts all files
client-side.  It is written in Go and contains both a client and server, so
users are free (and, at this point, expected) to host their own servers.


Disclaimer
==========

As this point, Asink is in its very early stages, and should not be trusted.
While I sincerely appreciate anyone who is willing to help me beta test it, I
cannot be responsible for any lost or corrupted files. Please, please, PLEASE,
keep appropriate non-Asink backups of all your files.

It is also quite possible that there are security/privacy-related bugs, so I
urge you not to solely rely upon Asink to keep prying eyes away from your files
(at least until a later release).


Installation
============

Please see the INSTALL document included with this repository for installation
instructions.


Server Usage
============

At this point, starting the server is simple -- just run `asinkd start'. This
will create a SQLite database in the current directory, use a socket at
/var/run/asink/asinkd.sock for communication, and serve content on port 8080.
The database configuration is not currently configurable (this is to come in a
future version), but the socket and port are configurable on the commandline.

Once it is running, you may use other `asinkd' commands to interact with the
Asink server. For instance, you may use `asinkd useradd user1' to add a user
named user1 to the server and create their password (this is necessary for a
user to use the server).

Each level of commands documents its usage if you add `-h'. For example,
`asinkd -h' will display the available commands, while `asinkd useradd -h' will
display the available options for that individual command.


Client Usage
============

If you have installed and configured the client for your machine, using the
client is as easy as running `asink start' (though you will have to add `-c
/path/to/config/file' if your configuration file is in a nonstandard location).

If you have not yet configured your client, please see the INSTALL file in the
same directory as this README file.

Similarly to the server, adding `-h' to the `asink' command or any of its
subcommands will display the help information for that command.

At this point in its development, the most notable `asink' subcommand is
`status', which will enable you to see quick statistics about what the Asink
client is doing. At the moment, these statistics are rather rough, but if
you're interested in knowing when all your files are done synchronizing `asink
status' will do the trick.


Debugging
=========

If you run into issues with your system failing to watch directories, check the
currently allowed number of inotify watches:

$ cat /proc/sys/fs/inotify/max_user_watches

To increase the number of allowed watches, increase the number reported, and
write it back out as root (you will need to consult your distribution to
identify a permanent method for fixing the number of allowed watches, as this
will only change it until your next reboot):

$ echo 100000 > /proc/sys/fs/inotify/max_user_watches

Documentation

Index

Constants

View Source
const (
	SUCCESS = 0 + iota
	ERROR
)
View Source
const (
	UPDATE = 1 << iota
	DELETE
)
View Source
const (
	//Local event status flags
	DISCARDED = EventStatus(1) << iota //event is to be discarded because it errored or is duplicate
	NOSAVE                             //event should not be saved (only current reason is because its in the top half of local processing)
)
View Source
const API_VERSION_STRING = "0.1"
View Source
const VERSION_STRING = "0.1"

Variables

This section is empty.

Functions

func Exit

func Exit(exitCode int)

func RPCCall

func RPCCall(socket, method string, args interface{}, reply interface{}) error

func SetupCleanExitOnSignals

func SetupCleanExitOnSignals()

func WaitOnExit

func WaitOnExit() int

func WaitOnExitChan

func WaitOnExitChan(waiterChan chan int)

Types

type APIResponse

type APIResponse struct {
	Status      APIStatus
	Explanation string
	Events      []*Event
}

type APIStatus

type APIStatus uint32

type Event

type Event struct {
	Id          int64
	Type        EventType
	Path        string
	Hash        string
	Predecessor string
	Timestamp   int64
	Permissions os.FileMode
	Username    string
	Sharename   string      //TODO start differentiating between a users' different shares
	LocalStatus EventStatus `json:"-"`
	LocalId     int64       `json:"-"`
	InDB        bool        `json:"-"` //defaults to false. Omitted from json marshalling.
}

func (*Event) IsDelete

func (e *Event) IsDelete() bool

func (*Event) IsSameEvent

func (e *Event) IsSameEvent(e2 *Event) bool

func (*Event) IsUpdate

func (e *Event) IsUpdate() bool

type EventList

type EventList struct {
	Events []*Event
}

type EventStatus

type EventStatus uint32

event status

type EventType

type EventType uint32

event type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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