Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blob
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-blob
Commits
1aa46744
Commit
1aa46744
authored
May 23, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand the documentation.
parent
7042f584
Pipeline
#219
skipped
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
148 additions
and
0 deletions
+148
-0
CONTRIBUTING.rst
CONTRIBUTING.rst
+30
-0
INSTALL.rst
INSTALL.rst
+48
-0
README.rst
README.rst
+35
-0
vmod_blob.vcc
src/vmod_blob.vcc
+35
-0
No files found.
CONTRIBUTING.rst
0 → 100644
View file @
1aa46744
CONTRIBUTING
============
To contribute code or documentation, submit a pull request at the
`source repository website
<https://code.uplex.de/uplex-varnish/libvmod-blob>`_.
If you have a problem or discover a bug, you can post an `issue
<https://code.uplex.de/uplex-varnish/libvmod-blob/issues>`_ at
the website. You can also write to <varnish-support@uplex.de>.
For developers
--------------
The build specifies C99 conformance, all compiler warnings turned on,
and all warnings considered errors (compiler options ``-std=c99
-Werror -Wall -Wextra``).
The VMOD has been tested with both the gcc and clang compilers, and
should always compile and test successfully with both of them.
By default, ``CFLAGS`` is set to ``-g -O2``, so that symbols are
included in the shared library, and optimization is at level
``O2``. To change or disable these options, set ``CFLAGS`` explicitly
before calling ``make`` (it may be set to the empty string).
For development/debugging cycles, the ``configure`` option
``--enable-debugging`` is recommended (off by default). This will turn
off optimizations and function inlining, so that a debugger will step
through the code as expected.
INSTALL.rst
0 → 100644
View file @
1aa46744
INSTALLATION
============
The
VMOD
is
built
against
a
Varnish
installation
,
and
the
autotools
use
``
pkg
-
config
(
1
)``
to
locate
the
necessary
header
files
and
other
resources
.
This
sequence
will
install
the
VMOD
::
>
./
autogen
.
sh
#
for
builds
from
the
git
repo
>
./
configure
>
make
>
make
check
#
to
run
unit
tests
in
src
/
tests
/*.
vtc
>
sudo
make
install
The
configure
step
requires
code
from
the
Autoconf
Archive
collection
of
m4
macros
.
If
you
encounter
difficulties
in
the
``
configure
``
step
,
make
sure
that
you
have
the
archive
installed
(
typically
as
the
package
``
autoconf
-
archive
``
on
many
distributions
).
To
configure
the
build
for
libgcrypt
,
``
configure
.
ac
``
uses
the
macro
``
AM_PATH_LIBGCRYPT
``
from
the
Autoconf
Archive
,
which
in
turn
invokes
the
``
libgcrypt
-
config
``
utility
.
The
macro
specifies
a
minimum
library
and
API
version
number
that
is
required
,
currently
libgcrypt
version
1.6.3
and
API
version
1.
If
you
want
to
build
against
a
version
of
libgcrypt
at
a
non
-
standard
location
(
that
is
,
whose
path
that
differs
from
the
one
described
by
``
libgcrypt
-
config
``),
then
use
the
``
configure
``
option
``--
with
-
libgcrypt
-
prefix
=$
LIBGCRYPT_PREFIX
``,
where
``$
LIBGCRYPT_PREFIX
``
is
the
alternative
path
.
The
``
make
check
``
step
requires
that
the
VMOD
blobcode
is
installed
for
the
Varnish
instance
against
which
the
build
is
executed
.
If
you
have
installed
Varnish
in
a
non
-
standard
directory
,
call
``
autogen
.
sh
``
and
``
configure
``
with
the
``
PKG_CONFIG_PATH
``
environment
variable
pointing
to
the
appropriate
path
.
For
example
,
when
varnishd
configure
was
called
with
``--
prefix
=$
PREFIX
``,
use
::
>
PKG_CONFIG_PATH
=${
PREFIX
}/
lib
/
pkgconfig
>
export
PKG_CONFIG_PATH
By
default
,
the
vmod
``
configure
``
script
installs
the
vmod
in
the
same
directory
as
Varnish
,
determined
via
``
pkg
-
config
(
1
)``.
The
vmod
installation
directory
can
be
overridden
by
passing
the
``
VMOD_DIR
``
variable
to
``
configure
``.
Other
files
such
as
the
man
-
page
are
installed
in
the
locations
determined
by
``
configure
``,
which
inherits
its
default
``--
prefix
``
setting
from
Varnish
.
README.rst
View file @
1aa46744
...
...
@@ -24,6 +24,26 @@ SYNOPSIS
import blob [from "path"] ;
::
BOOL blob.same(BLOB, BLOB)
BOOL blob.equal(BLOB, BLOB)
INT blob.length(BLOB)
INT blob.integer(BLOB [, ENUM padding])
STRING blob.version()
DESCRIPTION
===========
This Varnish Module (VMOD) provides a number of utility functions for
use with the data type BLOB, which denotes an arbitrary region of
memory.
BLOBs are not created by any part of native VCL, and can only be
created by other VMODs, so it is necessary to use this VMOD together
with another one that does so (such as VMOD ``blobcode`` for
binary-to-text encodings, see `SEE ALSO`_).
CONTENTS
========
...
...
@@ -112,6 +132,21 @@ Example::
std.log("Using VMOD blob version " + blob.version());
INSTALLATION
============
See `INSTALL.rst <INSTALL.rst>`_ in the source repository.
SEE ALSO
========
* varnishd(1)
* vcl(7)
* source repository: https://code.uplex.de/uplex-varnish/libvmod-gcrypt
* VMOD blobcode: https://code.uplex.de/uplex-varnish/libvmod-blobcode
* developer contact: <varnish-support@uplex.de>, and at the source
repository site
COPYRIGHT
=========
...
...
src/vmod_blob.vcc
View file @
1aa46744
...
...
@@ -9,6 +9,26 @@
$Module blob 3 basic operations for the VCL blob type
::
BOOL blob.same(BLOB, BLOB)
BOOL blob.equal(BLOB, BLOB)
INT blob.length(BLOB)
INT blob.integer(BLOB [, ENUM padding])
STRING blob.version()
DESCRIPTION
===========
This Varnish Module (VMOD) provides a number of utility functions for
use with the data type BLOB, which denotes an arbitrary region of
memory.
BLOBs are not created by any part of native VCL, and can only be
created by other VMODs, so it is necessary to use this VMOD together
with another one that does so (such as VMOD ``blobcode`` for
binary-to-text encodings, see `SEE ALSO`_).
$Function BOOL same(BLOB, BLOB)
Returns true if and only if the two BLOB arguments are the same
...
...
@@ -52,3 +72,18 @@ Returns the version string for this VMOD.
Example::
std.log("Using VMOD blob version " + blob.version());
INSTALLATION
============
See `INSTALL.rst <INSTALL.rst>`_ in the source repository.
SEE ALSO
========
* varnishd(1)
* vcl(7)
* source repository: https://code.uplex.de/uplex-varnish/libvmod-gcrypt
* VMOD blobcode: https://code.uplex.de/uplex-varnish/libvmod-blobcode
* developer contact: <varnish-support@uplex.de>, and at the source
repository site
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment