Home Download Docs Code Community
import "perkeep/pkg/client/android"
Overview
Index

Overview ▾

Package android contains code specific to running the Perkeep client code as a child process on Android. This removes ugly API from the client package itself.

Index

func Dial(network, addr string) (net.Conn, error)
func IsChild() bool
func NoteFileUploaded(fullPath string, uploaded bool)
func OnAndroid() bool
func PreExit()
func Printf(format string, args ...interface{})
func TLSConfig() (*tls.Config, error)
type StatsTransport
    func (t StatsTransport) RoundTrip(req *http.Request) (res *http.Response, err error)
type StatusReceiver
    func (asr StatusReceiver) ReceiveBlob(ctx context.Context, blob blob.Ref, source io.Reader) (blob.SizedRef, error)
    func (asr StatusReceiver) StatBlobs(ctx context.Context, blobs []blob.Ref, fn func(blob.SizedRef) error) error

Package files

androidx.go androidx_real.go

func Dial

func Dial(network, addr string) (net.Conn, error)

func IsChild

func IsChild() bool

IsChild reports whether this process is running as an Android child process and should report its output in the form that the Android uploader app expects.

func NoteFileUploaded

func NoteFileUploaded(fullPath string, uploaded bool)

NoteFileUploaded is a hook for pk-put to report that a file was uploaded. TODO: move this to pkg/client/android probably.

func OnAndroid

func OnAndroid() bool

func PreExit

func PreExit()

func Printf

func Printf(format string, args ...interface{})

func TLSConfig

func TLSConfig() (*tls.Config, error)

type StatsTransport

type StatsTransport struct {
    Rt http.RoundTripper
}

func (StatsTransport) RoundTrip

func (t StatsTransport) RoundTrip(req *http.Request) (res *http.Response, err error)

type StatusReceiver

type StatusReceiver struct {
    Sr   blobserver.StatReceiver
    Path string
}

StatusReceiver is a blobserver.StatReceiver wrapper that reports the full filename path and size of uploaded blobs. The android app wrapping pk-put watches stdout for this, for progress bars.

func (StatusReceiver) ReceiveBlob

func (asr StatusReceiver) ReceiveBlob(ctx context.Context, blob blob.Ref, source io.Reader) (blob.SizedRef, error)

func (StatusReceiver) StatBlobs

func (asr StatusReceiver) StatBlobs(ctx context.Context, blobs []blob.Ref, fn func(blob.SizedRef) error) error
Website layout inspired by memcached.
Content by the authors.