grpc

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAgentOptions

func NewAgentOptions(grpcOptions *GRPCOptions, clusterName, agentID string) *options.CloudEventsAgentOptions

func NewSourceOptions

func NewSourceOptions(gRPCOptions *GRPCOptions, sourceID string) *options.CloudEventsSourceOptions

Types

type GRPCConfig

type GRPCConfig struct {
	// URL is the address of the gRPC server (host:port).
	URL string `json:"url" yaml:"url"`
	// CAFile is the file path to a cert file for the gRPC server certificate authority.
	CAFile string `json:"caFile,omitempty" yaml:"caFile,omitempty"`
	// ClientCertFile is the file path to a client cert file for TLS.
	ClientCertFile string `json:"clientCertFile,omitempty" yaml:"clientCertFile,omitempty"`
	// ClientKeyFile is the file path to a client key file for TLS.
	ClientKeyFile string `json:"clientKeyFile,omitempty" yaml:"clientKeyFile,omitempty"`
	// TokenFile is the file path to a token file for authentication.
	TokenFile string `json:"tokenFile,omitempty" yaml:"tokenFile,omitempty"`
}

GRPCConfig holds the information needed to build connect to gRPC server as a given user.

type GRPCOptions

type GRPCOptions struct {
	URL            string
	CAFile         string
	ClientCertFile string
	ClientKeyFile  string
	TokenFile      string
}

GRPCOptions holds the options that are used to build gRPC client.

func BuildGRPCOptionsFromFlags

func BuildGRPCOptionsFromFlags(configPath string) (*GRPCOptions, error)

BuildGRPCOptionsFromFlags builds configs from a config filepath.

func NewGRPCOptions

func NewGRPCOptions() *GRPCOptions

func (*GRPCOptions) GetCloudEventsProtocol added in v0.14.0

func (o *GRPCOptions) GetCloudEventsProtocol(ctx context.Context, errorHandler func(error), clientOpts ...protocol.Option) (options.CloudEventsProtocol, error)

func (*GRPCOptions) GetGRPCClientConn

func (o *GRPCOptions) GetGRPCClientConn() (*grpc.ClientConn, error)

Directories

Path Synopsis
protobuf
v1

Jump to

Keyboard shortcuts

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