view release on metacpan or search on metacpan
linux-labjack/INSTALL view on Meta::CPAN
HID NOTE: If the hid module is loaded (use lsmod to view the modules and
look for "hid"), the provided labjack driver will not work correctly.
Since the Labjack is classified as a HID device, the hid driver will
claim the device. However, the hid driver does not support the "Interrupt"
out endpoint used by the Labjack and thus cannot communicate with the
Labjack. You must remove the hid driver prior to loading the labjack
driver. The following command, as root, should suffice:
# modprobe -r hid
linux-labjack/INSTALL view on Meta::CPAN
HID NOTE: If the hid module is loaded (use lsmod to view the modules and
look for "hid"), the provided labjack driver will not work correctly.
Since the Labjack is classified as a HID device, the hid driver will claim
the device. However, the hid driver does not support the "Interrupt" out
endpoint used by the Labjack and thus cannot communicate with the Labjack.
You must remove the hid driver prior to loading the labjack driver. The
following command, as root, should suffice:
# modprobe -r hid
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Serial/MSLuRM.pm view on Meta::CPAN
This variant of L<Device::Serial::SLuRM> allows communication with a
collection of nodes using Multi-drop SLµRM over a serial port, such as over
an RS-485 bus.
The endpoint running with this module takes the role of the bus controller.
Currently this module does not support being a non-controller node.
=cut
use constant is_multidrop => 1;
view all matches for this distribution
view release on metacpan or search on metacpan
Win32Async.pm view on Meta::CPAN
functionality is the same as the libusb function whose name is
the method name prepended with "usb_".
Generally, define a $Context variable which the library will use to keep track of
the asynchronous call. Activate the transfer (read or write, depending on the
endpoint) using submit_async() as shown, then loop calling reap_async_nocancel()
while checking the return code.
You can have any number of async operations pending on different endpoints - just
define multiple context variables as needed (ie - $Context1, $Context2, &c).
=cut
Win32Async.pm view on Meta::CPAN
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=item Packetsize
The size of the isochronous packets
Win32Async.pm view on Meta::CPAN
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
Win32Async.pm view on Meta::CPAN
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/USB.pm view on Meta::CPAN
=item level
0 disables debugging, 1 enables some debug messages, and 2 enables verbose
debug messages
Any other values are forced to the nearest endpoint.
=back
=cut
lib/Device/USB.pm view on Meta::CPAN
=item libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size)
=item libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size)
=item libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout)
lib/Device/USB.pm view on Meta::CPAN
int libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size)
{
return usb_get_descriptor((usb_dev_handle *)dev, type, index, buf, size);
}
int libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size)
{
return usb_get_descriptor_by_endpoint((usb_dev_handle *)dev, ep, type, index, buf, size);
}
int libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout)
{
return usb_bulk_write((usb_dev_handle *)dev, ep, bytes, size, timeout);
lib/Device/USB.pm view on Meta::CPAN
return newRV_noinc( (SV*)hash );
}
/*
* Given a pointer to a usb_endpoint_descriptor struct, create a reference
* to a Device::USB::DevEndpoint object that represents it.
*/
static SV* build_endpoint( struct usb_endpoint_descriptor* endpt )
{
HV* hash = newHV();
hashStoreInt( hash, "bDescriptorType", endpt->bDescriptorType );
hashStoreInt( hash, "bEndpointAddress", endpt->bEndpointAddress );
lib/Device/USB.pm view on Meta::CPAN
gv_stashpv( "Device::USB::DevEndpoint", 1 )
);
}
/*
* Given a pointer to an array of usb_endpoint_descriptor structs, create a
* reference to a Perl array containing the same data.
*/
static SV* list_endpoints( struct usb_endpoint_descriptor* endpt, unsigned count )
{
AV* array = newAV();
unsigned i = 0;
for(i=0; i < count; ++i)
{
av_push( array, build_endpoint( endpt+i ) );
}
return newRV_noinc( (SV*)array );
}
lib/Device/USB.pm view on Meta::CPAN
hashStoreInt( hash, "bNumEndpoints", inter->bNumEndpoints );
hashStoreInt( hash, "bInterfaceClass", inter->bInterfaceClass );
hashStoreInt( hash, "bInterfaceSubClass", inter->bInterfaceSubClass );
hashStoreInt( hash, "bInterfaceProtocol", inter->bInterfaceProtocol );
hashStoreInt( hash, "iInterface", inter->iInterface );
hashStoreSV( hash, "endpoints",
list_endpoints( inter->endpoint, inter->bNumEndpoints )
);
/* TODO: handle the 'extra' data */
return sv_bless( newRV_noinc( (SV*)hash ),
gv_stashpv( "Device::USB::DevInterface", 1 )
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/XBee/API.pm view on Meta::CPAN
};
use constant XBEE_API_TRANSMIT_STATUS_TO_STRING => {
0x00 => 'Success',
0x02 => 'CCA Failure',
0x15 => 'Invalid destination endpoint',
0x21 => 'Network ACK Failure',
0x22 => 'Not Joined to Network',
0x23 => 'Self-addressed',
0x24 => 'Address Not Found',
0x25 => 'Route Not Found',
lib/Device/XBee/API.pm view on Meta::CPAN
}
=head2 remote_at
Send an AT command to a remote module. Accepts three parameters: a hashref with
endpoint addresses, command options, frame_id; the AT command name (as
two-character string); and the third as the expected data for that command (if
any) as a string. See the XBee datasheet for a list of supported AT commands
and expected data for each.
Endpoint addresses should be specified as a hashref containing the following
lib/Device/XBee/API.pm view on Meta::CPAN
}
=head2 tx
Sends a transmit request to the XBee. Accepts three parameters, the first is the
endpoint address, the second is a scalar containing the data to be sent, and the
third is an optional flag (known as the async flag) specifying whether or not
the method should wait for an acknowledgement from the XBee.
Endpoint addresses should be specified as a hashref containing the following
keys:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DeyeCloud/Client.pm view on Meta::CPAN
#
$deye->baseurl('https://eu1-developer.deyecloud.com/v1.0');
$deye->method('POST');
my $data = $deye->call('station/latest', 'stationId' => INTEGER);
Available options list depends on endpoint. Most endpoints are described
in Deye Cloud developer guide.
=back
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DigitalOcean/Droplet/Upgrade.pm view on Meta::CPAN
A time value given in ISO8601 combined date and time format that represents when the migration will occur for the droplet.
=head2 url
A URL pointing to the Droplet's API endpoint. This is the endpoint to be used if you want to retrieve information about the droplet.
=head2 id
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
instead of doing it longhand
0.03 2018-01-29
[!!BREAKING CHANGES!!]
- major re-arrangement of the internals for building
a stream, there is no longer an endpoint called
`stream` which you must call before things are
usable, instead things are just always usable.
- removed the `stream` method from `Directory::Scanner`
- moved all the builder methods from `Directory::Scanner`
to `Directory::Scanner::API::Stream` instead, so that
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
dist_zilla_docker_api_plugin_plan.md view on Meta::CPAN
$client->remote_tag_exists($image_ref); # optional registry helper
```
### `...::Progress`
Docker build/push endpoints return streaming progress records. The plugin should parse these and forward:
```text
stream/status/progress -> log_debug or log
errorDetail/error -> log_fatal
aux.ID -> captured image ID
view all matches for this distribution
view release on metacpan or search on metacpan
bin/createrelease.pl view on Meta::CPAN
generate_release_notes => $github_notes,
}
);
die "Unable to create release for $identity{login}\\$releases->{repo}" if ($response->code eq '404');
#die "Validation failed, or the endpoint has been spammed." if ($response->code eq '422');
die "login or token invalid for the specified repository: $identity{login}\\$releases->{repo}\n"
if ($response->code eq '403');
if ($response->code ne '201') {
my $message = $response->raw_content();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pod/Weaver/PluginBundle/Author/GETTY.pm view on Meta::CPAN
Parse a configuration file and return a hashref.
=head2 =resource
Documents available resources, features, or API endpoints.
=resource servers
Cloud servers (create, delete, power on/off)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Docker/Client.pm view on Meta::CPAN
our $VERSION = '0.1.1';
class_type 'Mojo::URL';
coerce 'Mojo::URL', from 'Str', via { Mojo::URL->new(shift) };
has 'endpoint' => (
is => 'ro',
isa => 'Mojo::URL',
default => sub {
return Mojo::URL->new('http+unix://%2Fvar%2Frun%2Fdocker.sock');
},
lib/Docker/Client.pm view on Meta::CPAN
default => sub {
my $self = shift;
## Making sure we use the correct version path
my $base_url =
$self->endpoint()->clone()->path( sprintf '/%s', $self->version() );
## Loading correct version specification from disk.
my $spec =
Mojo::File->new( dist_dir('Docker-Client') )->child('specs')
->child( sprintf '%s.yaml', $self->version() );
## Creating the OpenAPI Client instance using the defined parameters.
my $api =
OpenAPI::Client->new( $spec->to_string(),
base_url => $self->endpoint() );
## If the protocol is local we need to replace the "Host" header on each request
if ( $self->endpoint()->protocol() eq 'http+unix' ) {
$api->ua()->on(
start => sub {
my ( $ua, $tx ) = @_;
$tx->req()->headers()->header( 'Host' => 'localhost' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Docker/Registry/Auth/Gitlab.pm view on Meta::CPAN
The repository you request access to.
=head2 jwt
The endpoint to request the JWT token from, defaults to
'https://gitlab.com/jwt/auth'. You can use a 'Str' or an URI object.
=head1 METHODS
=head2 get_bearer_token
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dubber/API.pm view on Meta::CPAN
);
method _build_json_coder () { return Cpanel::JSON::XS->new->utf8; }
# ------------------------------------------------------------------------
has endpoints => (
is => 'ro',
default => sub {
{ root => { path => '/' },
# Group Methods (Group Authentication Required)
lib/Dubber/API.pm view on Meta::CPAN
};
},
);
method commands () { return $self->endpoints; }
# ------------------------------------------------------------------------
method upload_recording_mp3_file ($account_id, $call_metadata, $mp3_file_or_data) {
my @data_parts = $self->_split_recording_data($mp3_file_or_data);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ELab/Client.pm view on Meta::CPAN
is => 'ro',
isa => 'Str',
required => 1,
);
has endpoint => (
is => 'ro',
isa => 'Str',
default => 'api/v1/'
);
lib/ELab/Client.pm view on Meta::CPAN
my (%args) = validated_hash(
\@_,
file => { isa => 'Str' },
);
my $request = HTTP::Request::Common::POST(
$self->host().$self->endpoint()."experiments/$id",
{
file => [ $args{file} ]
},
Content_Type => 'form-data',
Authorization => $self->token(),
lib/ELab/Client.pm view on Meta::CPAN
my (%args) = validated_hash(
\@_,
file => { isa => 'Str' },
);
my $request = HTTP::Request::Common::POST(
$self->host().$self->endpoint()."items/$id",
{
file => [ $args{file} ]
},
Content_Type => 'form-data',
Authorization => $self->token(),
lib/ELab/Client.pm view on Meta::CPAN
sub elab_get {
my $self = shift;
my $url = shift;
my $result = $self->GET($self->endpoint().$url);
return undef unless $result->responseCode() eq '200';
return $result->responseContent();
}
sub elab_delete {
my $self = shift;
my $url = shift;
my $result = $self->DELETE($self->endpoint().$url);
return undef unless $result->responseCode() eq '200';
return $result->responseContent();
}
lib/ELab/Client.pm view on Meta::CPAN
my $self = shift;
my $url = shift;
my $data = shift;
$data =~ s/^\?//; # buildQuery starts with "?" (makes no sense here)
my $headers = { 'Content-Type' => 'application/x-www-form-urlencoded' };
my $result = $self->POST($self->endpoint().$url, $data, $headers);
return undef unless $result->responseCode() eq '200';
return $result->responseContent();
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/ecs_amqp_recv.py view on Meta::CPAN
# Influenced by solace-samples-amqp-qpid-proton-python and cli-proton-python:
# https://github.com/SolaceSamples/solace-samples-amqp-qpid-proton-python
# https://github.com/rh-messaging/cli-proton-python
#
# Qpid Proton Python is dependent on the Qpid Proton C API. E.g., Receiver.flow(n):
# https://qpid.apache.org/releases/qpid-proton-0.37.0/proton/python/docs/_modules/proton/_endpoints.html
# https://qpid.apache.org/releases/qpid-proton-0.37.0/proton/c/api/group__link.html
#
# The Red Hat Qpid Python documentation may also be informative:
# https://docs.redhat.com/en/documentation/red_hat_build_of_apache_qpid_proton_python/0.40/html/using_qpid_python/index
#
view all matches for this distribution
view release on metacpan or search on metacpan
bin/epfl-net-ssl-test view on Meta::CPAN
while ( not $host = $labs->analyze( host => $domain )->complete() ) {
sleep $labs->previous_eta();
}
if ( $host->ready() ) {
foreach my $endpoint ( $host->endpoints() ) {
if ( $endpoint->ready() ) {
print "\n", $endpoint->ip_address(), "\n"
or croak "Couldn't write: $OS_ERROR";
print color('green'), 'â Diode', "\n", color('clear')
or croak "Couldn't write: $OS_ERROR";
print color('green'), 'â SSL Certificate', "\n", color('clear')
or croak "Couldn't write: $OS_ERROR";
if ( $endpoint->grade() eq 'A' or $endpoint->grade() eq 'A+' ) {
print color('green'), 'â Grade ', $endpoint->grade(), "\n\n",
color('clear')
or croak "Couldn't write: $OS_ERROR";
}
else {
print color('red'), 'â Grade ', $endpoint->grade(), "\n\n",
color('clear')
or croak "Couldn't write: $OS_ERROR";
}
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
#!/usr/bin/env perl
# TLS connection â connect over a TLS-fronted ClickHouse port.
#
# Set up a TLS endpoint (e.g. with stunnel or nginx) and point this script
# at it via CLICKHOUSE_TLS_HOST / CLICKHOUSE_TLS_PORT.
use strict;
use warnings;
use EV;
use EV::ClickHouse;
view all matches for this distribution
view release on metacpan or search on metacpan
use EV::Etcd;
# Check if etcd is running
my $etcd_running = 0;
eval {
my $result = `etcdctl endpoint health 2>&1`;
$etcd_running = 1 if $result =~ /is healthy/;
};
die "etcd not running\n" unless $etcd_running;
my $client = EV::Etcd->new(
endpoints => ['127.0.0.1:2379'],
);
my $prefix = "/bench_$$";
my $iterations = $ENV{BENCH_ITER} || 1000;
view all matches for this distribution
view release on metacpan or search on metacpan
eg/etcd_series.pl view on Meta::CPAN
use feature 'say';
# Initialize Etcd client
# Note: Ensure etcd is running on localhost:2379
my $etcd = EV::Etcd->new(
endpoints => ['127.0.0.1:2379'],
);
my @steps = (
{ key => '/config/step1', val => 'init' },
{ key => '/config/step2', val => 'processing' },
view all matches for this distribution
view release on metacpan or search on metacpan
deps/hiredis/README.md view on Meta::CPAN
}
}
```
One can also use `redisConnectWithOptions` which takes a `redisOptions` argument
that can be configured with endpoint information as well as many different flags
to change how the `redisContext` will be configured.
```c
redisOptions opt = {0};
/* One can set the endpoint with one of our helper macros */
if (tcp) {
REDIS_OPTIONS_SET_TCP(&opt, "localhost", 6379);
} else {
REDIS_OPTIONS_SET_UNIX(&opt, "/tmp/redis.sock");
}
view all matches for this distribution
view release on metacpan or search on metacpan
eg/health_checker.pl view on Meta::CPAN
host => $ENV{NATS_HOST} // '127.0.0.1',
port => $ENV{NATS_PORT} // 4222,
on_error => sub { warn "nats: @_\n" },
on_connect => sub {
if ($mode eq 'service' || $mode eq 'both') {
# Register health endpoint
$nats->subscribe("health.$name", sub {
my ($subj, $payload, $reply) = @_;
return unless $reply;
# Simulate health: 90% healthy, 10% degraded
my $status = rand() < 0.9 ? 'healthy' : 'degraded';
$nats->publish($reply, "$name:$status:$$:" . int(rand(100)) . "ms");
});
print "service '$name' registered health endpoint\n";
if ($mode eq 'both') {
# Also register a second service for demo
$nats->subscribe("health.db", sub {
my ($subj, $payload, $reply) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
deps/hiredis/README.md view on Meta::CPAN
}
}
```
One can also use `redisConnectWithOptions` which takes a `redisOptions` argument
that can be configured with endpoint information as well as many different flags
to change how the `redisContext` will be configured.
```c
redisOptions opt = {0};
/* One can set the endpoint with one of our helper macros */
if (tcp) {
REDIS_OPTIONS_SET_TCP(&opt, "localhost", 6379);
} else {
REDIS_OPTIONS_SET_UNIX(&opt, "/tmp/redis.sock");
}
deps/hiredis/README.md view on Meta::CPAN
/* Finally various options may be set via the `options` member, as described below */
opt->options |= REDIS_OPT_PREFER_IPV4;
```
If a connection is lost, `int redisReconnect(redisContext *c)` can be used to restore the connection using the same endpoint and options as the given context.
### Configurable redisOptions flags
There are several flags you may set in the `redisOptions` struct to change default behavior. You can specify the flags via the `redisOptions->options` member.
view all matches for this distribution
view release on metacpan or search on metacpan
t/27-review-coverage.t view on Meta::CPAN
is(scalar(@during), 0, "connections() excludes a still-connecting conn");
my $to = EV::timer(10, 0, sub { diag "Timeout!"; EV::break });
EV::run;
my @after = $ctx->connections; # client + server endpoints now open
ok(scalar(@after) >= 1, "connections() includes the established conn(s)");
$keep{cli}->close(1000) if $keep{cli};
}
# 10. send_fragment binary path: binary fragments reassemble into one binary
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Eixo/Docker/Container.pm view on Meta::CPAN
action=>'attach',
method=>'POST',
host=>$self->api->client->endpoint,
args=>\%args,
url_args=>[qw(logs stream stdin stdout stderr)],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Eixo/Rest/Api.pm view on Meta::CPAN
sub DESTROY {}
sub initialize{
my ($self, $endpoint, %opts) = @_;
$self->client(
Eixo::Rest::Client->new($endpoint, %opts)
);
$self->SUPER::initialize(%opts);
$self;
view all matches for this distribution
view release on metacpan or search on metacpan
t/Elive/MockConnection.pm view on Meta::CPAN
my $self = {};
bless $self, $class;
$url ||= 'http://elive_mock_connection';
$url =~ s{/$}{}; # lose trailing '/'
$url =~ s{/webservice\.event$}{}; # lose endpoint
$url =~ s{/v[1-9]$}{}; # lose adapter path
if ($url =~ s{^(\w+)://(.*)\@}{$1://}) { # lose/capture credentials
my ($_user, $_pass) = split(':', $2, 2);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Email/Abuse/Investigator.pm view on Meta::CPAN
$ua->env_proxy(1);
$self->{ua} = $ua;
}
# Use the ARIN RDAP endpoint; it covers the ARIN region and redirects
# for RIPE/APNIC/LACNIC/AfriNIC allocations.
my $res = eval { $ua->get("https://rdap.arin.net/registry/ip/$ip") };
return {} unless $res && $res->is_success();
my $j = $res->decoded_content();
view all matches for this distribution