kactivator

package module
v0.0.0-...-a918e91 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

README

kactivator

How to use

prepare
ISTIO=$GOPATH/src/istio.io/istio
cd $ISTIO/mixer/adapter
git clone https://github.com/nak3/kactivator.git
Build

quay.io/nak3 must be replaced by your container registry's.

bash build.sh "quay.io/nak3"
Deploy
kubectl apply -f testdata/template.yaml
kubectl apply -f testdata/kactivator.yaml
kubectl apply -f kactivator-adapter.yaml
kubectl apply -f testdata/sample_operator_cfg.yaml

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcAdapter

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

GrpcAdapter supports authorization template.

func (*GrpcAdapter) Addr

func (s *GrpcAdapter) Addr() string

Addr returns the listening address of the server

func (*GrpcAdapter) Close

func (s *GrpcAdapter) Close() error

Close gracefully shuts down the server; used for testing

func (*GrpcAdapter) HandleAuthorization

HandleAuthorization request

func (*GrpcAdapter) Run

func (s *GrpcAdapter) Run(shutdown chan error)

Run starts the server run

type Server

type Server interface {
	Addr() string
	Close() error
	Run(shutdown chan error)
}

Server is basic server interface

func NewGrpcAdapter

func NewGrpcAdapter(addr string) (Server, error)

NewGrpcAdapter creates a new IBP adapter that listens at provided port.

type Stat

type Stat struct {
	// The time the data point was received by autoscaler.
	Time *time.Time

	// The unique identity of this pod.  Used to count how many pods
	// are contributing to the metrics.
	PodName string

	// Average number of requests currently being handled by this pod.
	AverageConcurrentRequests float64

	// Part of AverageConcurrentRequests, for requests going through a proxy.
	AverageProxiedConcurrentRequests float64

	// Number of requests received since last Stat (approximately QPS).
	RequestCount float64

	// Part of RequestCount, for requests going through a proxy.
	ProxiedRequestCount float64
}

Stat defines a single measurement at a point in time

type StatMessage

type StatMessage struct {
	Key  types.NamespacedName
	Stat Stat
}

StatMessage wraps a Stat with identifying information so it can be routed to the correct receiver.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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