http

package
v0.0.0-...-0e62607 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var API = HttpAPI{}

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Code    APIResponseCode
	Message string
	Details interface{}
}

APIResponse is a response returned as JSON to various requests.

type APIResponseCode

type APIResponseCode int

APIResponseCode is an OK/ERROR response code

const (
	ERROR APIResponseCode = iota
	OK
)

func (*APIResponseCode) MarshalJSON

func (this *APIResponseCode) MarshalJSON() ([]byte, error)

func (*APIResponseCode) String

func (this *APIResponseCode) String() string

type HttpAPI

type HttpAPI struct{}

func (*HttpAPI) AbortSeed

func (this *HttpAPI) AbortSeed(params martini.Params, r render.Render, req *http.Request)

AbortSeed

func (*HttpAPI) ApplyRelaylogContents

func (this *HttpAPI) ApplyRelaylogContents(params martini.Params, r render.Render, req *http.Request)

ApplyRelaylogContents reads binlog contents from request's body and applies them locally

func (*HttpAPI) AvailableLocalSnapshots

func (this *HttpAPI) AvailableLocalSnapshots(params martini.Params, r render.Render, req *http.Request)

LocalSnapshots lists dc-local available snapshots for this host

func (*HttpAPI) AvailableSnapshots

func (this *HttpAPI) AvailableSnapshots(params martini.Params, r render.Render, req *http.Request)

Snapshots lists available snapshots for this host

func (*HttpAPI) BinlogBinaryContents

func (this *HttpAPI) BinlogBinaryContents(params martini.Params, r render.Render, req *http.Request)

BinlogBinaryContents returns contents of binary log entries

func (*HttpAPI) BinlogContents

func (this *HttpAPI) BinlogContents(params martini.Params, r render.Render, req *http.Request)

BinlogContents returns contents of binary log entries

func (*HttpAPI) CreateSnapshot

func (this *HttpAPI) CreateSnapshot(params martini.Params, r render.Render, req *http.Request)

CreateSnapshot lists dc-local available snapshots for this host

func (*HttpAPI) DeleteMySQLDataDir

func (this *HttpAPI) DeleteMySQLDataDir(params martini.Params, r render.Render, req *http.Request)

DeleteMySQLDataDir compeltely erases MySQL data directory. Use with care!

func (*HttpAPI) DiskUsage

func (this *HttpAPI) DiskUsage(params martini.Params, r render.Render, req *http.Request)

DiskUsage returns the number of bytes of a give ndirectory (recursive)

func (*HttpAPI) GetMount

func (this *HttpAPI) GetMount(params martini.Params, r render.Render, req *http.Request)

GetMount shows the configured mount point's status

func (*HttpAPI) GetMySQLDataDirAvailableDiskSpace

func (this *HttpAPI) GetMySQLDataDirAvailableDiskSpace(params martini.Params, r render.Render, req *http.Request)

GetMySQLDataDirAvailableDiskSpace returns the number of bytes free within the MySQL datadir mount

func (*HttpAPI) Hostname

func (this *HttpAPI) Hostname(params martini.Params, r render.Render)

Hostname provides information on this process

func (*HttpAPI) ListLogicalVolumes

func (this *HttpAPI) ListLogicalVolumes(params martini.Params, r render.Render, req *http.Request)

ListLogicalVolumes lists logical volumes by pattern

func (*HttpAPI) ListSnapshotsLogicalVolumes

func (this *HttpAPI) ListSnapshotsLogicalVolumes(params martini.Params, r render.Render, req *http.Request)

ListSnapshotsLogicalVolumes lists logical volumes by pattern

func (*HttpAPI) LogicalVolume

func (this *HttpAPI) LogicalVolume(params martini.Params, r render.Render, req *http.Request)

LogicalVolume lists a logical volume by name/path/mount point

func (*HttpAPI) MountLV

func (this *HttpAPI) MountLV(params martini.Params, r render.Render, req *http.Request)

MountLV mounts a logical volume on config mount point

func (*HttpAPI) MySQLDiskUsage

func (this *HttpAPI) MySQLDiskUsage(params martini.Params, r render.Render, req *http.Request)

MySQLDiskUsage returns the number of bytes on the MySQL datadir

func (*HttpAPI) MySQLErrorLogTail

func (this *HttpAPI) MySQLErrorLogTail(params martini.Params, r render.Render, req *http.Request)

returns rows in tail of mysql error log

func (*HttpAPI) MySQLPort

func (this *HttpAPI) MySQLPort(params martini.Params, r render.Render, req *http.Request)

MySQLPort returns the (heuristic) port on which MySQL executes

func (*HttpAPI) MySQLRunning

func (this *HttpAPI) MySQLRunning(params martini.Params, r render.Render, req *http.Request)

MySQLRunning checks whether the MySQL service is up

func (*HttpAPI) MySQLStart

func (this *HttpAPI) MySQLStart(params martini.Params, r render.Render, req *http.Request)

MySQLStop starts the MySQL service

func (*HttpAPI) MySQLStop

func (this *HttpAPI) MySQLStop(params martini.Params, r render.Render, req *http.Request)

MySQLStop shuts down the MySQL service

func (*HttpAPI) PostCopy

func (this *HttpAPI) PostCopy(params martini.Params, r render.Render, req *http.Request)

PostCopy

func (*HttpAPI) ReceiveMySQLSeedData

func (this *HttpAPI) ReceiveMySQLSeedData(params martini.Params, r render.Render, req *http.Request)

ReceiveMySQLSeedData

func (*HttpAPI) RegisterRequests

func (this *HttpAPI) RegisterRequests(m *martini.ClassicMartini)

RegisterRequests makes for the de-facto list of known API calls

func (*HttpAPI) RelayLogEndCoordinates

func (this *HttpAPI) RelayLogEndCoordinates(params martini.Params, r render.Render, req *http.Request)

RelayLogFiles returns the list of active relay logs

func (*HttpAPI) RelayLogFiles

func (this *HttpAPI) RelayLogFiles(params martini.Params, r render.Render, req *http.Request)

RelayLogFiles returns the list of active relay logs

func (*HttpAPI) RelayLogIndexFile

func (this *HttpAPI) RelayLogIndexFile(params martini.Params, r render.Render, req *http.Request)

RelayLogIndexFile returns mysql relay log index file, full path

func (*HttpAPI) RelaylogContentsTail

func (this *HttpAPI) RelaylogContentsTail(params martini.Params, r render.Render, req *http.Request)

RelaylogContentsTail returns contents of relay logs, from given position to the very last entry

func (*HttpAPI) RemoveLV

func (this *HttpAPI) RemoveLV(params martini.Params, r render.Render, req *http.Request)

RemoveLV removes a logical volume

func (*HttpAPI) RunCommand

func (this *HttpAPI) RunCommand(params martini.Params, r render.Render, req *http.Request)

func (*HttpAPI) SeedCommandCompleted

func (this *HttpAPI) SeedCommandCompleted(params martini.Params, r render.Render, req *http.Request)

SeedCommandCompleted

func (*HttpAPI) SeedCommandSucceeded

func (this *HttpAPI) SeedCommandSucceeded(params martini.Params, r render.Render, req *http.Request)

SeedCommandCompleted

func (*HttpAPI) SendMySQLSeedData

func (this *HttpAPI) SendMySQLSeedData(params martini.Params, r render.Render, req *http.Request)

SendMySQLSeedData

func (*HttpAPI) Status

func (this *HttpAPI) Status(params martini.Params, r render.Render, req *http.Request)

A simple status endpoint to ping to see if the agent is up and responding. There's not much to do here except respond with 200 and OK This is pointed to by a configurable endpoint and has a configurable status message

func (*HttpAPI) Unmount

func (this *HttpAPI) Unmount(params martini.Params, r render.Render, req *http.Request)

Unmount umounts the config mount point

Jump to

Keyboard shortcuts

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