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 ¶
- Variables
- func DatabaseDaemonDialLocalhost(ctx context.Context, port int, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func DatabaseDaemonDialService(ctx context.Context, serviceAndPort string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func DatabaseDaemonDialSocket(ctx context.Context, socket string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func EZ(user, pass, host, port, svc string, asSysDba bool) string
- func GrpcUnixDialer(ctx context.Context, addr string) (net.Conn, error)
- func UnixDialer(ctx context.Context, addr string) (net.Conn, error)
Constants ¶
This section is empty.
Variables ¶
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 )
var ( // CallTimeout can be set via a flag by the program importing the library. CallTimeout = 5 * time.Minute )
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 ¶
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 ¶
GrpcUnixDialer opens up a unix socket connection compatible with gRPC dialers.
Types ¶
This section is empty.