Artur Bergman > Varnish-API-1.99_1 > Varnish::API

Download:
Varnish-API-1.99_1.tar.gz

Dependencies

Annotate this POD

Module Version: 1.99_1   Source  

NAME ^

Varnish::API - Perl extension for accessing varnish stats and logs

SYNOPSIS ^

  use Varnish::API;
  use Sys::Hostname qw(hostname);

  my $vd = Varnish::API::VSL_New();
  Varnish::API::VSL_OpenLog($vd, hostname);

  Varnish::API::VSL_Dispatch($vd, 
    sub { my ($tag, $id, $spec, $text) = @_; return 1 });

  my $log = Varnish::API::VSL_NextLog($vd);
  my $tag = Varnish::API::VSL_tags(Varnish::API::SHMLOG_TAG($log));
  my $fd  = Varnish::API::SHMLOG_ID($log);
  my $text = Varnish::API::SHMLOG_DATA($log);

  my $stats = Varnish::API::VSL_OpenStats(hostname);
  my $fields = Varnish::API::VSL_GetStatFieldTypes();
  my $description = Varnish::API::VSL_GetStatFieldDescriptions();
  my $client_conn = Varnish::API::VSL_GetStat($stats, "client_conn");

DESCRIPTION ^

This module allows access to the data that varnishlog and varnishstats can read.

EXPORT

None by default.

SEE ALSO ^

AUTHOR ^

Artur Bergman <sky+cpan@crucially.net>

COPYRIGHT AND LICENSE ^

Copyright (C) 2009 by Artur Bergman

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: