Index | Files

package android

import ""

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.


Package Files

androidx.go androidx_real.go

func Dial Uses

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

func IsChild Uses

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 Uses

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 Uses

func OnAndroid() bool

func PreExit Uses

func PreExit()

func Printf Uses

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

func TLSConfig Uses

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

type StatsTransport Uses

type StatsTransport struct {
    Rt http.RoundTripper

func (StatsTransport) RoundTrip Uses

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

type StatusReceiver Uses

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 Uses

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

func (StatusReceiver) StatBlobs Uses

func (asr StatusReceiver) StatBlobs(ctx context.Context, blobs []blob.Ref, fn func(blob.SizedRef) error) error

Package android imports 23 packages (graph) and is imported by 2 packages. Updated 2019-07-09. Refresh now. Tools for package owners.