Skip to content

Commit

Permalink
Add legal header to all source code files
Browse files Browse the repository at this point in the history
  • Loading branch information
ikolomi committed Jan 31, 2024
1 parent e39f4ae commit d64c66b
Show file tree
Hide file tree
Showing 129 changed files with 443 additions and 1 deletion.
4 changes: 4 additions & 0 deletions benchmarks/csharp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

using System.Collections.Concurrent;
using System.Diagnostics;
using System.Linq;
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/node/node_benchmark.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

import { writeFileSync } from "fs";
import { Logger, RedisClient, RedisClusterClient } from "glide-for-redis";
import { Cluster, Redis } from "ioredis";
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/python/python_benchmark.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0

import argparse
import asyncio
import functools
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/rust/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

#[cfg(not(target_env = "msvc"))]
use tikv_jemallocator::Jemalloc;

Expand Down
2 changes: 2 additions & 0 deletions benchmarks/utilities/csv_exporter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/python3

# Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0

import csv
import json
import os
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/utilities/fill_db.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

import {
SIZE_SET_KEYSPACE,
createRedisClient,
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/utilities/flush_db.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

import { RedisClientType, RedisClusterType } from "redis";
import { createRedisClient, receivedOptions } from "./utils";

Expand Down
4 changes: 4 additions & 0 deletions benchmarks/utilities/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

import commandLineArgs from "command-line-args";
import {
RedisClientType,
Expand Down
6 changes: 5 additions & 1 deletion csharp/lib/AsyncClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Runtime.InteropServices;
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

using System.Runtime.InteropServices;

namespace Glide
{
Expand Down
4 changes: 4 additions & 0 deletions csharp/lib/Logger.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

using System.Runtime.InteropServices;
using System.Text;

Expand Down
4 changes: 4 additions & 0 deletions csharp/lib/Message.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
Expand Down
4 changes: 4 additions & 0 deletions csharp/lib/MessageContainer.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

using System.Collections.Concurrent;

namespace Glide
Expand Down
4 changes: 4 additions & 0 deletions csharp/lib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("tests")]
3 changes: 3 additions & 0 deletions csharp/lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use glide_core::connection_request;
use glide_core::{client::Client as GlideClient, connection_request::NodeAddress};
use redis::{Cmd, FromRedisValue, RedisResult};
Expand Down
4 changes: 4 additions & 0 deletions csharp/tests/AsyncClientTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

namespace tests;

using Glide;
Expand Down
4 changes: 4 additions & 0 deletions csharp/tests/Usings.cs
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

global using NUnit.Framework;
4 changes: 4 additions & 0 deletions examples/node/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

import { Logger, RedisClient, RedisClusterClient } from "@aws/glide-for-redis";

async function sendPingToNode() {
Expand Down
2 changes: 2 additions & 0 deletions examples/python/client_example.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0

import asyncio
from typing import Optional, Union

Expand Down
3 changes: 3 additions & 0 deletions glide-core/benches/connections_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use criterion::{criterion_group, criterion_main, Criterion};
use futures::future::join_all;
use redis::{
Expand Down
3 changes: 3 additions & 0 deletions glide-core/benches/memory_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use glide_core::{
client::Client,
connection_request::{ConnectionRequest, NodeAddress, TlsMode},
Expand Down
3 changes: 3 additions & 0 deletions glide-core/benches/rotating_buffer_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use std::io::Write;

use bytes::BufMut;
Expand Down
4 changes: 4 additions & 0 deletions glide-core/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

fn main() {
let customization_options = protobuf_codegen::Customize::default()
.lite_runtime(false)
Expand Down
3 changes: 3 additions & 0 deletions glide-core/src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use crate::connection_request::{
ConnectionRequest, NodeAddress, ProtocolVersion, ReadFrom, TlsMode,
};
Expand Down
3 changes: 3 additions & 0 deletions glide-core/src/client/reconnecting_connection.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use crate::connection_request::{NodeAddress, TlsMode};
use crate::retry_strategies::RetryStrategy;
use futures_intrusive::sync::ManualResetEvent;
Expand Down
3 changes: 3 additions & 0 deletions glide-core/src/client/standalone_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use super::get_redis_connection_info;
use super::reconnecting_connection::ReconnectingConnection;
use crate::connection_request::{ConnectionRequest, NodeAddress, TlsMode};
Expand Down
3 changes: 3 additions & 0 deletions glide-core/src/client/value_conversion.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use redis::{cluster_routing::Routable, from_redis_value, Cmd, ErrorKind, RedisResult, Value};

pub(crate) enum ExpectedReturnType {
Expand Down
4 changes: 4 additions & 0 deletions glide-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

include!(concat!(env!("OUT_DIR"), "/protobuf/mod.rs"));
pub mod client;
mod retry_strategies;
Expand Down
3 changes: 3 additions & 0 deletions glide-core/src/retry_strategies.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use crate::connection_request::ConnectionRetryStrategy;
use std::time::Duration;
use tokio_retry::strategy::{jitter, ExponentialBackoff};
Expand Down
3 changes: 3 additions & 0 deletions glide-core/src/rotating_buffer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use bytes::BytesMut;
use integer_encoding::VarInt;
use logger_core::log_error;
Expand Down
3 changes: 3 additions & 0 deletions glide-core/src/scripts_container.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use arcstr::ArcStr;
use logger_core::log_info;
use once_cell::sync::Lazy;
Expand Down
3 changes: 3 additions & 0 deletions glide-core/src/socket_listener.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use super::rotating_buffer::RotatingBuffer;
use crate::client::Client;
use crate::connection_request::ConnectionRequest;
Expand Down
3 changes: 3 additions & 0 deletions glide-core/tests/test_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
mod utilities;

#[cfg(test)]
Expand Down
3 changes: 3 additions & 0 deletions glide-core/tests/test_cluster_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
mod utilities;

#[cfg(test)]
Expand Down
3 changes: 3 additions & 0 deletions glide-core/tests/test_socket_listener.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use glide_core::*;
use rsevents::{Awaitable, EventState, ManualResetEvent};
use std::io::prelude::*;
Expand Down
3 changes: 3 additions & 0 deletions glide-core/tests/test_standalone_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
mod utilities;

#[cfg(test)]
Expand Down
3 changes: 3 additions & 0 deletions glide-core/tests/utilities/cluster.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use super::{create_connection_request, ClusterMode, TestConfiguration};
use futures::future::{join_all, BoxFuture};
use futures::FutureExt;
Expand Down
3 changes: 3 additions & 0 deletions glide-core/tests/utilities/mocks.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use futures_intrusive::sync::ManualResetEvent;
use redis::{Cmd, ConnectionAddr, Value};
use std::collections::HashMap;
Expand Down
4 changes: 4 additions & 0 deletions glide-core/tests/utilities/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

#![allow(dead_code)]
use futures::Future;
use glide_core::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks;

import static glide.benchmarks.utils.Benchmarking.testClientSetGet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.clients;

import java.util.concurrent.ExecutionException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.clients;

import glide.benchmarks.utils.ConnectionSettings;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.clients;

/** A Redis client with sync capabilities */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.clients.jedis;

import glide.benchmarks.clients.SyncClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.clients.lettuce;

import glide.benchmarks.clients.AsyncClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.utils;

import glide.benchmarks.BenchmarkingApp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.utils;

public enum ChosenAction {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.utils;

/** Redis-client settings */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.utils;

import com.google.gson.Gson;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.benchmarks.utils;

import java.util.Arrays;
Expand Down
4 changes: 4 additions & 0 deletions java/client/src/main/java/glide/api/BaseClient.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.api;

import glide.ffi.resolvers.RedisValueResolver;
Expand Down
4 changes: 4 additions & 0 deletions java/client/src/main/java/glide/api/RedisClient.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.api;

import static glide.ffi.resolvers.SocketListenerResolver.getSocket;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Copyright GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

package glide.api.commands;

import java.util.concurrent.CompletableFuture;
Expand Down
Loading

0 comments on commit d64c66b

Please sign in to comment.