android

package
v0.0.0-...-1907995 Latest Latest
Warning

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

Go to latest
Published: May 6, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

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

Constants

This section is empty.

Variables

This section is empty.

Functions

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)

Types

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

Jump to

Keyboard shortcuts

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