mongodb

package
v0.6.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMongoDB

func NewMongoDB(logger logger.Logger) bindings.OutputBinding

NewMongoDB returns a new MongoDB Binding

Types

type MongoDBOperations

type MongoDBOperations struct {
	BaseOperations
	// contains filtered or unexported fields
}

MongoDBOperations is a binding implementation for MongoDB.

func (*MongoDBOperations) GetRole

func (mongoOps *MongoDBOperations) GetRole(ctx context.Context, request *bindings.InvokeRequest, response *bindings.InvokeResponse) (string, error)

func (*MongoDBOperations) GetRoleOps

func (mongoOps *MongoDBOperations) GetRoleOps(ctx context.Context, req *bindings.InvokeRequest, resp *bindings.InvokeResponse) (OpsResult, error)

func (*MongoDBOperations) GetRunningPort

func (mongoOps *MongoDBOperations) GetRunningPort() int

func (*MongoDBOperations) Init

func (mongoOps *MongoDBOperations) Init(metadata bindings.Metadata) error

Init initializes the MongoDB Binding.

func (*MongoDBOperations) InitDelay

func (mongoOps *MongoDBOperations) InitDelay() error

func (*MongoDBOperations) Ping

func (mongoOps *MongoDBOperations) Ping() error

func (*MongoDBOperations) StatusCheck

func (mongoOps *MongoDBOperations) StatusCheck(ctx context.Context, cmd string, response *bindings.InvokeResponse) (OpsResult, error)

type OpTime

type OpTime struct {
	TS primitive.Timestamp `bson:"ts"`
	T  int64               `bson:"t"`
}

type ReplSetGetStatus

type ReplSetGetStatus struct {
	Set                     string          `bson:"set"`
	Date                    time.Time       `bson:"date"`
	MyState                 int64           `bson:"myState"`
	Term                    int64           `bson:"term"`
	HeartbeatIntervalMillis int64           `bson:"heartbeatIntervalMillis"`
	Members                 []ReplSetMember `bson:"members"`
	Ok                      int64           `bson:"ok"`
}

type ReplSetMember

type ReplSetMember struct {
	ID                   int64               `bson:"_id"`
	Name                 string              `bson:"name"`
	Health               int64               `bson:"health"`
	State                int64               `bson:"state"`
	StateStr             string              `bson:"stateStr"`
	Uptime               int64               `bson:"uptime"`
	Optime               *OpTime             `bson:"optime"`
	OptimeDate           time.Time           `bson:"optimeDate"`
	OptimeDurableDate    time.Time           `bson:"optimeDurableDate"`
	LastAppliedWallTime  time.Time           `bson:"lastAppliedWallTime"`
	LastDurableWallTime  time.Time           `bson:"lastDurableWallTime"`
	LastHeartbeatMessage string              `bson:"lastHeartbeatMessage"`
	SyncSourceHost       string              `bson:"syncSourceHost"`
	SyncSourceID         int64               `bson:"syncSourceId"`
	InfoMessage          string              `bson:"infoMessage"`
	ElectionTime         primitive.Timestamp `bson:"electionTime"`
	ElectionDate         time.Time           `bson:"electionDate"`
	ConfigVersion        int64               `bson:"configVersion"`
	ConfigTerm           int64               `bson:"configTerm"`
	Self                 bool                `bson:"self"`
}

Jump to

Keyboard shortcuts

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