etcd: go.etcd.io/etcd/vendor/github.com/coreos/pkg/dlopen Index | Files

package dlopen

import "go.etcd.io/etcd/vendor/github.com/coreos/pkg/dlopen"

Package dlopen provides some convenience functions to dlopen a library and get its symbols.

Index

Package Files

dlopen.go dlopen_example.go

Variables

var ErrSoNotFound = errors.New("unable to open a handle to the library")

type LibHandle Uses

type LibHandle struct {
    Handle  unsafe.Pointer
    Libname string
}

LibHandle represents an open handle to a library (.so)

func GetHandle Uses

func GetHandle(libs []string) (*LibHandle, error)

GetHandle tries to get a handle to a library (.so), attempting to access it by the names specified in libs and returning the first that is successfully opened. Callers are responsible for closing the handler. If no library can be successfully opened, an error is returned.

func (*LibHandle) Close Uses

func (l *LibHandle) Close() error

Close closes a LibHandle.

func (*LibHandle) GetSymbolPointer Uses

func (l *LibHandle) GetSymbolPointer(symbol string) (unsafe.Pointer, error)

GetSymbolPointer takes a symbol name and returns a pointer to the symbol.

Package dlopen imports 4 packages (graph). Updated 2018-10-29. Refresh now. Tools for package owners.