common

package
v0.5.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package common provides general utilities.

Some utility function(s) for oracle connection strings.

Helpers for communicating with Database Daemon. Both *nix domain socket and TCP/IP communication with the Database Daemon are supported with domain sockets being the default mechanism.

Index

Constants

This section is empty.

Variables

View Source
var (
	// MaxAttempts can be set via a flag by the program importing the library.
	MaxAttempts = 5
	// MaxDelay can be set via a flag by the program importing the library.
	MaxDelay = 30 * time.Second
)

Functions

func DatabaseDaemonDialLocalhost

func DatabaseDaemonDialLocalhost(ctx context.Context, port int, opts ...grpc.DialOption) (*grpc.ClientConn, error)

DatabaseDaemonDialLocalhost connects to a local Database Daemon via gRPC.

func DatabaseDaemonDialService

func DatabaseDaemonDialService(ctx context.Context, serviceAndPort string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

DatabaseDaemonDialService connects to Database Service via gRPC.

func DatabaseDaemonDialSocket

func DatabaseDaemonDialSocket(ctx context.Context, socket string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

DatabaseDaemonDialSocket connects to Database Daemon via gRPC.

func EZ

func EZ(user, pass, host, port, svc string, asSysDba bool) string

EZ returns EZConnect string compatible with oracle tooling. All parameters except host are optional, refer to documentation. See https://docs.oracle.com/database/121/NETAG/naming.htm#NETAG1112.

func GrpcUnixDialer

func GrpcUnixDialer(ctx context.Context, addr string) (net.Conn, error)

GrpcUnixDialer opens up a unix socket connection compatible with gRPC dialers.

func UnixDialer

func UnixDialer(ctx context.Context, addr string) (net.Conn, error)

UnixDialer opens a socket connection.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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