com

package
v0.0.0-...-e034a0f Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package com is generated code used to make or handle TChannel calls using Thrift.

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int
View Source
var StoreNodeIncrActionResult_Success_DEFAULT bool
View Source
var StoreNodeRateLimitGlobalActionResult_Success_DEFAULT bool

Functions

func NewTChanStoreNodeInheritedClient

func NewTChanStoreNodeInheritedClient(thriftService string, client thrift.TChanClient) *tchanStoreNodeClient

func NewTChanStoreNodeServer

func NewTChanStoreNodeServer(handler TChanStoreNode) thrift.TChanServer

NewTChanStoreNodeServer wraps a handler for TChanStoreNode so it can be registered with a thrift.Server.

Types

type StoreNode

type StoreNode interface {
	// Parameters:
	//  - Syncs
	SyncKeys(syncs []*SyncCommand) (err error)
	// Parameters:
	//  - Key
	//  - Threshold
	//  - Window
	//  - Peakaveraged
	SyncRateConfig(key string, threshold int32, window int32, peakaveraged bool) (err error)
	// Parameters:
	//  - Key
	//  - Count
	//  - Threshold
	//  - Window
	//  - Peakaveraged
	IncrAction(key string, count int32, threshold int32, window int32, peakaveraged bool) (r bool, err error)
	// Parameters:
	//  - Key
	//  - Count
	RateLimitGlobalAction(key string, count int32) (r bool, err error)
}

type StoreNodeClient

type StoreNodeClient struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

func NewStoreNodeClientProtocol

func NewStoreNodeClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *StoreNodeClient

func (*StoreNodeClient) IncrAction

func (p *StoreNodeClient) IncrAction(key string, count int32, threshold int32, window int32, peakaveraged bool) (r bool, err error)

Parameters:

  • Key
  • Count
  • Threshold
  • Window
  • Peakaveraged

func (*StoreNodeClient) RateLimitGlobalAction

func (p *StoreNodeClient) RateLimitGlobalAction(key string, count int32) (r bool, err error)

Parameters:

  • Key
  • Count

func (*StoreNodeClient) SyncKeys

func (p *StoreNodeClient) SyncKeys(syncs []*SyncCommand) (err error)

Parameters:

  • Syncs

func (*StoreNodeClient) SyncRateConfig

func (p *StoreNodeClient) SyncRateConfig(key string, threshold int32, window int32, peakaveraged bool) (err error)

Parameters:

  • Key
  • Threshold
  • Window
  • Peakaveraged

type StoreNodeIncrActionArgs

type StoreNodeIncrActionArgs struct {
	Key          string `thrift:"key,1" db:"key" json:"key"`
	Count        int32  `thrift:"count,2" db:"count" json:"count"`
	Threshold    int32  `thrift:"threshold,3" db:"threshold" json:"threshold"`
	Window       int32  `thrift:"window,4" db:"window" json:"window"`
	Peakaveraged bool   `thrift:"peakaveraged,5" db:"peakaveraged" json:"peakaveraged"`
}

Attributes:

  • Key
  • Count
  • Threshold
  • Window
  • Peakaveraged

func NewStoreNodeIncrActionArgs

func NewStoreNodeIncrActionArgs() *StoreNodeIncrActionArgs

func (*StoreNodeIncrActionArgs) GetCount

func (p *StoreNodeIncrActionArgs) GetCount() int32

func (*StoreNodeIncrActionArgs) GetKey

func (p *StoreNodeIncrActionArgs) GetKey() string

func (*StoreNodeIncrActionArgs) GetPeakaveraged

func (p *StoreNodeIncrActionArgs) GetPeakaveraged() bool

func (*StoreNodeIncrActionArgs) GetThreshold

func (p *StoreNodeIncrActionArgs) GetThreshold() int32

func (*StoreNodeIncrActionArgs) GetWindow

func (p *StoreNodeIncrActionArgs) GetWindow() int32

func (*StoreNodeIncrActionArgs) Read

func (*StoreNodeIncrActionArgs) ReadField1

func (p *StoreNodeIncrActionArgs) ReadField1(iprot thrift.TProtocol) error

func (*StoreNodeIncrActionArgs) ReadField2

func (p *StoreNodeIncrActionArgs) ReadField2(iprot thrift.TProtocol) error

func (*StoreNodeIncrActionArgs) ReadField3

func (p *StoreNodeIncrActionArgs) ReadField3(iprot thrift.TProtocol) error

func (*StoreNodeIncrActionArgs) ReadField4

func (p *StoreNodeIncrActionArgs) ReadField4(iprot thrift.TProtocol) error

func (*StoreNodeIncrActionArgs) ReadField5

func (p *StoreNodeIncrActionArgs) ReadField5(iprot thrift.TProtocol) error

func (*StoreNodeIncrActionArgs) String

func (p *StoreNodeIncrActionArgs) String() string

func (*StoreNodeIncrActionArgs) Write

type StoreNodeIncrActionResult

type StoreNodeIncrActionResult struct {
	Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"`
}

Attributes:

  • Success

func NewStoreNodeIncrActionResult

func NewStoreNodeIncrActionResult() *StoreNodeIncrActionResult

func (*StoreNodeIncrActionResult) GetSuccess

func (p *StoreNodeIncrActionResult) GetSuccess() bool

func (*StoreNodeIncrActionResult) IsSetSuccess

func (p *StoreNodeIncrActionResult) IsSetSuccess() bool

func (*StoreNodeIncrActionResult) Read

func (*StoreNodeIncrActionResult) ReadField0

func (p *StoreNodeIncrActionResult) ReadField0(iprot thrift.TProtocol) error

func (*StoreNodeIncrActionResult) String

func (p *StoreNodeIncrActionResult) String() string

func (*StoreNodeIncrActionResult) Write

type StoreNodeProcessor

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

func NewStoreNodeProcessor

func NewStoreNodeProcessor(handler StoreNode) *StoreNodeProcessor

func (*StoreNodeProcessor) AddToProcessorMap

func (p *StoreNodeProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*StoreNodeProcessor) GetProcessorFunction

func (p *StoreNodeProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*StoreNodeProcessor) Process

func (p *StoreNodeProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*StoreNodeProcessor) ProcessorMap

func (p *StoreNodeProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

type StoreNodeRateLimitGlobalActionArgs

type StoreNodeRateLimitGlobalActionArgs struct {
	Key   string `thrift:"key,1" db:"key" json:"key"`
	Count int32  `thrift:"count,2" db:"count" json:"count"`
}

Attributes:

  • Key
  • Count

func NewStoreNodeRateLimitGlobalActionArgs

func NewStoreNodeRateLimitGlobalActionArgs() *StoreNodeRateLimitGlobalActionArgs

func (*StoreNodeRateLimitGlobalActionArgs) GetCount

func (*StoreNodeRateLimitGlobalActionArgs) GetKey

func (*StoreNodeRateLimitGlobalActionArgs) Read

func (*StoreNodeRateLimitGlobalActionArgs) ReadField1

func (*StoreNodeRateLimitGlobalActionArgs) ReadField2

func (*StoreNodeRateLimitGlobalActionArgs) String

func (*StoreNodeRateLimitGlobalActionArgs) Write

type StoreNodeRateLimitGlobalActionResult

type StoreNodeRateLimitGlobalActionResult struct {
	Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"`
}

Attributes:

  • Success

func NewStoreNodeRateLimitGlobalActionResult

func NewStoreNodeRateLimitGlobalActionResult() *StoreNodeRateLimitGlobalActionResult

func (*StoreNodeRateLimitGlobalActionResult) GetSuccess

func (*StoreNodeRateLimitGlobalActionResult) IsSetSuccess

func (p *StoreNodeRateLimitGlobalActionResult) IsSetSuccess() bool

func (*StoreNodeRateLimitGlobalActionResult) Read

func (*StoreNodeRateLimitGlobalActionResult) ReadField0

func (*StoreNodeRateLimitGlobalActionResult) String

func (*StoreNodeRateLimitGlobalActionResult) Write

type StoreNodeSyncKeysArgs

type StoreNodeSyncKeysArgs struct {
	Syncs []*SyncCommand `thrift:"syncs,1" db:"syncs" json:"syncs"`
}

Attributes:

  • Syncs

func NewStoreNodeSyncKeysArgs

func NewStoreNodeSyncKeysArgs() *StoreNodeSyncKeysArgs

func (*StoreNodeSyncKeysArgs) GetSyncs

func (p *StoreNodeSyncKeysArgs) GetSyncs() []*SyncCommand

func (*StoreNodeSyncKeysArgs) Read

func (*StoreNodeSyncKeysArgs) ReadField1

func (p *StoreNodeSyncKeysArgs) ReadField1(iprot thrift.TProtocol) error

func (*StoreNodeSyncKeysArgs) String

func (p *StoreNodeSyncKeysArgs) String() string

func (*StoreNodeSyncKeysArgs) Write

func (p *StoreNodeSyncKeysArgs) Write(oprot thrift.TProtocol) error

type StoreNodeSyncKeysResult

type StoreNodeSyncKeysResult struct {
}

func NewStoreNodeSyncKeysResult

func NewStoreNodeSyncKeysResult() *StoreNodeSyncKeysResult

func (*StoreNodeSyncKeysResult) Read

func (*StoreNodeSyncKeysResult) String

func (p *StoreNodeSyncKeysResult) String() string

func (*StoreNodeSyncKeysResult) Write

type StoreNodeSyncRateConfigArgs

type StoreNodeSyncRateConfigArgs struct {
	Key          string `thrift:"key,1" db:"key" json:"key"`
	Threshold    int32  `thrift:"threshold,2" db:"threshold" json:"threshold"`
	Window       int32  `thrift:"window,3" db:"window" json:"window"`
	Peakaveraged bool   `thrift:"peakaveraged,4" db:"peakaveraged" json:"peakaveraged"`
}

Attributes:

  • Key
  • Threshold
  • Window
  • Peakaveraged

func NewStoreNodeSyncRateConfigArgs

func NewStoreNodeSyncRateConfigArgs() *StoreNodeSyncRateConfigArgs

func (*StoreNodeSyncRateConfigArgs) GetKey

func (p *StoreNodeSyncRateConfigArgs) GetKey() string

func (*StoreNodeSyncRateConfigArgs) GetPeakaveraged

func (p *StoreNodeSyncRateConfigArgs) GetPeakaveraged() bool

func (*StoreNodeSyncRateConfigArgs) GetThreshold

func (p *StoreNodeSyncRateConfigArgs) GetThreshold() int32

func (*StoreNodeSyncRateConfigArgs) GetWindow

func (p *StoreNodeSyncRateConfigArgs) GetWindow() int32

func (*StoreNodeSyncRateConfigArgs) Read

func (*StoreNodeSyncRateConfigArgs) ReadField1

func (p *StoreNodeSyncRateConfigArgs) ReadField1(iprot thrift.TProtocol) error

func (*StoreNodeSyncRateConfigArgs) ReadField2

func (p *StoreNodeSyncRateConfigArgs) ReadField2(iprot thrift.TProtocol) error

func (*StoreNodeSyncRateConfigArgs) ReadField3

func (p *StoreNodeSyncRateConfigArgs) ReadField3(iprot thrift.TProtocol) error

func (*StoreNodeSyncRateConfigArgs) ReadField4

func (p *StoreNodeSyncRateConfigArgs) ReadField4(iprot thrift.TProtocol) error

func (*StoreNodeSyncRateConfigArgs) String

func (p *StoreNodeSyncRateConfigArgs) String() string

func (*StoreNodeSyncRateConfigArgs) Write

type StoreNodeSyncRateConfigResult

type StoreNodeSyncRateConfigResult struct {
}

func NewStoreNodeSyncRateConfigResult

func NewStoreNodeSyncRateConfigResult() *StoreNodeSyncRateConfigResult

func (*StoreNodeSyncRateConfigResult) Read

func (*StoreNodeSyncRateConfigResult) String

func (*StoreNodeSyncRateConfigResult) Write

type SyncCommand

type SyncCommand struct {
	Key    string `thrift:"key,1" db:"key" json:"key"`
	Count  int32  `thrift:"count,2" db:"count" json:"count"`
	Expiry int64  `thrift:"expiry,3" db:"expiry" json:"expiry"`
	Force  bool   `thrift:"force,4" db:"force" json:"force"`
}

Attributes:

  • Key
  • Count
  • Expiry
  • Force

func NewSyncCommand

func NewSyncCommand() *SyncCommand

func (*SyncCommand) GetCount

func (p *SyncCommand) GetCount() int32

func (*SyncCommand) GetExpiry

func (p *SyncCommand) GetExpiry() int64

func (*SyncCommand) GetForce

func (p *SyncCommand) GetForce() bool

func (*SyncCommand) GetKey

func (p *SyncCommand) GetKey() string

func (*SyncCommand) Read

func (p *SyncCommand) Read(iprot thrift.TProtocol) error

func (*SyncCommand) ReadField1

func (p *SyncCommand) ReadField1(iprot thrift.TProtocol) error

func (*SyncCommand) ReadField2

func (p *SyncCommand) ReadField2(iprot thrift.TProtocol) error

func (*SyncCommand) ReadField3

func (p *SyncCommand) ReadField3(iprot thrift.TProtocol) error

func (*SyncCommand) ReadField4

func (p *SyncCommand) ReadField4(iprot thrift.TProtocol) error

func (*SyncCommand) String

func (p *SyncCommand) String() string

func (*SyncCommand) Write

func (p *SyncCommand) Write(oprot thrift.TProtocol) error

type TChanStoreNode

type TChanStoreNode interface {
	IncrAction(ctx thrift.Context, key string, count int32, threshold int32, window int32, peakaveraged bool) (bool, error)
	RateLimitGlobalAction(ctx thrift.Context, key string, count int32) (bool, error)
	SyncKeys(ctx thrift.Context, syncs []*SyncCommand) error
	SyncRateConfig(ctx thrift.Context, key string, threshold int32, window int32, peakaveraged bool) error
}

TChanStoreNode is the interface that defines the server handler and client interface.

func NewTChanStoreNodeClient

func NewTChanStoreNodeClient(client thrift.TChanClient) TChanStoreNode

NewTChanStoreNodeClient creates a client that can be used to make remote calls.

Jump to

Keyboard shortcuts

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