httphandle

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommunicateMessage

type CommunicateMessage struct {
	ID     string `json:"id"`
	Action string `json:"action"`
	Key    string `json:"key"`
	Value  string `json:"val"`
	Lease  int64  `json:"lease"`
	Limit  int64  `json:"limit"`
	Prefix bool   `json:"prefix"`
	EndKey string `json:"endkey"`

	// Revision is a global revision. ModRevision is the revision that the key is modified.
	// the Revision is the current revision of etcd.
	// It is incremented every time the v3 backed is modified (e.g., Put, Delete, Txn).
	// ModRevision is the etcd revision of the last update to a key.
	// Version is the number of times the key has been modified since it was created.
	// Get(..., WithRev(rev)) will perform a Get as if the etcd store is still at revision rev
	// CreateRevision is the revision of last creation on this key.
	Revision *int64 `json:"revision"`
}

func (*CommunicateMessage) String

func (cm *CommunicateMessage) String() string

type CommunicateResponse

type CommunicateResponse struct {
	ID      string          `json:"id"`
	Action  string          `json:"action"`
	Success bool            `json:"success"`
	Key     string          `json:"key"`
	Event   *etcd.EtcdEvent `json:"event"`
	Err     string          `json:"err"`
}

func (*CommunicateResponse) Bytes

func (cr *CommunicateResponse) Bytes() []byte

func (*CommunicateResponse) String

func (cr *CommunicateResponse) String() string

type EtcdHandle

type EtcdHandle struct {
	// contains filtered or unexported fields
}

func NewEtcdHandle

func NewEtcdHandle(lg *zap.Logger) *EtcdHandle

func (*EtcdHandle) Close

func (eh *EtcdHandle) Close()

func (*EtcdHandle) Connect

func (eh *EtcdHandle) Connect(c *gin.Context)

Jump to

Keyboard shortcuts

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